Hello,
For my vinyl jukebox project, which runs with processing, I would like to make an app to control the jukebox through wifi.
This is the first time I try to make an program for Android.
I installed successfully Processing4 and the android mode on my PC with windows11. The sdk was also installed with the automatic method successfully, and so was the emulator.
My phone (Xiaomi MI11) is in USB debug mode and I can see it is connected via the Android/devices menu.
When I launch the example sketch from the android for processing tutorial , I have an encouraging last message in the console:
BUILD SUCCESSFUL in 19s
27 actionable tasks: 27 executed
But I also have these lines just before:
Task :app:compileDebugJavaWithJavac
Annotation processing got disabled, since it requires a 1.6 compliant JVM
Task :app:dexBuilderDebug
Task :app:desugarDebugFileDependencies
Task :app:mergeExtDexDebug
Task :app:mergeDexDebug
Task :app:packageDebug
Task :app:createDebugApkListingFileRedirect
Task :app:assembleDebug
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use ââwarning-mode allâ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See Command-Line Interface
My phone then prompts if I want to install the app. After pressing the âInstallâ button on the phone, the program seems to be launched because the screen becomes white for a tenth of a second before showing the home menu again. I also get a lot of error messages lines, starting with:
FATAL EXCEPTION: main
Process: processing.test.tutoandroid, PID: 24658
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/~~-bvU_owdL5jMbZ3fu757Kw==/processing.test.tutoandroid-rBHYAJjU_SUzumhNmU4O-Q==/base.apk)
at processing.a2d.PGraphicsAndroid2D.createSurface(PGraphicsAndroid2D.java:180)
at processing.core.PApplet.initSurface(PApplet.java:538)
and ending with:
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/~~-bvU_owdL5jMbZ3fu757Kw==/processing.test.tutoandroid-rBHYAJjU_SUzumhNmU4O-Q==/base.apk)
⌠31 more
If I run the program with the emulator, the behaviour is exactly the same: the emulator is launched, the white screen for a fraction on second, and the same error messages on the console.
Here is the code from the tutorial that I am trying to run:
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
}
}
}
At this point, I am stuck!
Does anybody know what the problem is and point me on how to solve it?