GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Processing sketch won't open on android device. · Issue #729 · processing/processing-android

Processing sketch won't open on android device. #729

New issue
Copy link
New issue
Copy link
Open
Open
Processing sketch won't open on android device.#729
Copy link
Labels
needs confirmation

Description

@powerm9
powerm9
opened on Feb 28, 2023
Issue body actions

I can't run any sketch on my device, even the tutorial code. The code builds and I can see the sketch on my homepage but it crashes on startup. This is my first time using Processing for Android. My phone is a Xiaomi Redmi Mi 9t.

Tutorial code:

void setup() {
  fullScreen();
  noStroke();
  fill(0);
}

void draw() {
  background(204);
  if (mousePressed) {
    if (mouseX < width/2) {
      rect(0, 0, width/2, height); // Left
    } else {
      rect(width/2, 0, width/2, height); // Right
    }
  }
}

Here is the error code:

FATAL EXCEPTION: main
Process: processing.test.sketch_230228a, PID: 18243
java.lang.VerifyError: Rejecting class processing.a2d.PSurfaceAndroid2D that attempts to sub-type erroneous class processing.core.PSurfaceNone (declaration of 'processing.a2d.PSurfaceAndroid2D' appears in /data/app/~~pbDTqMMEtdX3RM-7t2y1gg==/processing.test.sketch_230228a-BovUAs_i6QCNcpIiUa_xtw==/base.apk)
	at processing.a2d.PGraphicsAndroid2D.createSurface(PGraphicsAndroid2D.java:180)
	at processing.core.PApplet.initSurface(PApplet.java:538)
	at processing.android.PFragment.onCreateView(PFragment.java:149)
	at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2600)
	at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:881)
	at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
	at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
	at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
	at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
	at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
	at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
	at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
	at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManagerImpl.java:2663)
	at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManagerImpl.java:2613)
	at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:246)
	at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:542)
	at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:210)
	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1436)
	at android.app.Activity.performStart(Activity.java:8188)
	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3573)
	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2154)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:236)
	at android.app.ActivityThread.main(ActivityThread.java:8107)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.VerifyError: Verifier rejected class processing.core.PSurfaceNone: android.content.Context processing.core.PSurfaceNone.getContext() failed to verify: android.content.Context processing.core.PSurfaceNone.getContext(): [0x22]  can't resolve returned type 'Reference: android.content.Context' or 'Unresolved Reference: android.support.wearable.watchface.WatchFaceService' (declaration of 'processing.core.PSurfaceNone' appears in /data/app/~~pbDTqMMEtdX3RM-7t2y1gg==/processing.test.sketch_230228a-BovUAs_i6QCNcpIiUa_xtw==/base.apk)
	... 31 more

Edit: Just tried in my friend's phone and it worked. I don't know why my phone's not working though.

Reacted by Simone Dotto

Activity

  1. codeanticode commented on Mar 20, 2023

    @codeanticode
    codeanticode
    on Mar 20, 2023
    Contributor
    More actions

    That's odd. What version of Processing and the Android mode are you using?

  2. codeanticode
    added
    needs confirmation
    on Mar 20, 2023
  3. powerm9 commented on Apr 2, 2023

    @powerm9
    powerm9
    on Apr 2, 2023
    Author
    More actions

    Android Studio 2022.1.1
    Processing 4

    I actually got a new phone recently, and it all works on that.

  4. vsquared commented on Apr 17, 2023

    @vsquared
    vsquared
    on Apr 17, 2023
    More actions

    I have two Android tablets connected to my system: old Galaxy S2, new Galaxy A8. The following code runs ok on the S2, but fails on the A8 with the same error message as that shown above. Processing version is 4.2.

    void setup() {
      fullScreen();
      background(209);
    }
    
    void draw() {  
    }
    

    Error message for A8:
    A8

  5. ajavamind commented on Apr 17, 2023

    @ajavamind
    ajavamind
    on Apr 17, 2023
    More actions

    I ran into a similar problem using Android Mode 4.5 (version 410) recently.
    I built a sketch for a tablet with Android API 15 (4.0.4) and the verify error appeared.
    The minimum target SDK is API 17 in Android Mode 410.
    I found it could not verify any class using the AppComponent.WATCHFACE.
    I built my own Android Mode library commenting out all AppComponent.WATCHFACE and references to watchface from PSurfaceNone.java, PSurfaceAndroid2D.java, PSurfaceGLES.java

    I would like to continue to use Processing Android with old Android devices (10+ years).
    Tried to attached the modified AndrodeMode.zip file I built, but it is too big.

    I made a repository with zip file at https://github.com/ajavamind/processing-android-410-api-15

  6. vsquared commented on Apr 17, 2023

    @vsquared
    vsquared
    on Apr 17, 2023
    More actions

    @ajavamind Thank you very much for your contribution; it appears that you solved the problem. I downloaded your zip file and placed it in the 'modes' folder of my Documents/Processing folder (macOS). I was then able to run a simple sketch on the new Galaxy A8 tablet without error using your version of AndroidMode.

  7. vsquared commented on Apr 20, 2023

    @vsquared
    vsquared
    on Apr 20, 2023 via email
    More actions
    Do you have any suggestions about how to solve this problem: #736 ?
    …
    On Mon, Apr 17, 2023 at 12:55 PM Andy Modla ***@***.***> wrote: I ran into a similar problem using Android Mode 4.5 (version 410) recently. I built a sketch for a tablet with Android API 15 (4.0.4) and the verify error appeared. The minimum target SDK is API 17 in Android Mode 410. I found it could not verify any class using the AppComponent.WATCHFACE. I built my own Android Mode library commenting out all AppComponent.WATCHFACE and references to watchface from PSurfaceNone.java, PSurfaceAndroid2D.java, PSurfaceGLES.java I would like to continue to use Processing Android with old Android devices (10+ years). Tried to attached the modified AndrodeMode.zip file I built, but it is too big. — Reply to this email directly, view it on GitHub <#729 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AARQD7BZCSRIDUMEMGPJH2TXBV7YJANCNFSM6AAAAAAVKRGIJI> . You are receiving this because you commented.Message ID: ***@***.***>
  8. ajavamind commented on Apr 20, 2023

    @ajavamind
    ajavamind
    on Apr 20, 2023
    More actions

    Processing android mode does not support javafx, issue #736 #736

  9. vsquared commented on Apr 20, 2023

    @vsquared
    vsquared
    on Apr 20, 2023 via email
    More actions
    Thanks for the information and reply.
    …
    On Thu, Apr 20, 2023 at 2:53 PM Andy Modla ***@***.***> wrote: Processing android mode does not support javafx, issue #736 <#736> #736 <#736> — Reply to this email directly, view it on GitHub <#729 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AARQD7HZMLWESP4X4NYUIT3XCGH33ANCNFSM6AAAAAAVKRGIJI> . You are receiving this because you commented.Message ID: ***@***.***>
  10. kauron commented on Jun 6, 2023

    @kauron
    kauron
    on Jun 6, 2023
    More actions

    I have the same problem. Here is my configuration:

    • Device: Samsung Galaxy Note 4 (Android 11 -- LineageOS)
    • Processing: 4.2.1 (installed from AUR in ArchLinux)
    • SDK Platform tools version: 34.0.3
    • Android Mode for Processing: 4.5.1

    I will try with other devices and versions of Android.

    Edit: it works correctly in a Huawei P20 Lite (ANE-LX1) with Android 9.1 (stock)

  11. bagnacauda commented on Jul 11, 2023

    @bagnacauda
    bagnacauda
    on Jul 11, 2023
    More actions

    Same here, with a Poco X3 Pro and LineageOS (could that be the reason?)

  12. tomjuggler commented on Jul 30, 2023

    @tomjuggler
    tomjuggler
    on Jul 30, 2023
    More actions

    @ajavamind your fix worked for me! Android fragmentation getting me down lately..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs confirmation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.