Hi everyone,
I’m running into a runtime crash in Processing Android Mode. The project builds successfully, installs on the device, but crashes immediately on launch with a VerifyError.
I’m hoping someone can help confirm whether this is a Processing Android Mode bug, a version mismatch, or a known compatibility issue.
Environment
- OS: Windows
- Processing: (Android Mode, bundled JDK 17)
- Android SDK: Installed via Processing Android Mode
- Gradle build: SUCCESSFUL
- Device: Physical Android device (not emulator)
Build status
Gradle completes without errors:
BUILD SUCCESSFUL in 1m 17s
27 actionable tasks: 27 executed
APK installs correctly.
Runtime crash (Logcat)
App crashes immediately on launch with the following stack trace:
FATAL EXCEPTION: main
Process: processing.test.sketch_260201b, PID: 14911
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/.../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:2963)
...
Caused by: java.lang.VerifyError: Verifier rejected class
processing.core.PSurfaceNone:
android.content.Context processing.core.PSurfaceNone.getContext()
failed to verify:
can't resolve returned type 'android.content.Context' or
'android.support.wearable.watchface.WatchFaceService'
(declaration of 'processing.core.PSurfaceNone' appears in base.apk)
Key observations
- Error points to:
PSurfaceAndroid2DPSurfaceNone
- Mentions an unresolved reference to:
android.support.wearable.watchface.WatchFaceService
- I am not targeting Wear OS and do not reference wearable APIs in my sketch
What I’ve already verified
- JDK 17 is working correctly
- Gradle caches cleared
- Android SDK reinstalled
- Project compiles cleanly
- Issue reproduces even with simple / example sketches