Processing compilation error with AndroidMode 4.0

edited January 15 in Android Mode


I ran in some issue installing processing on my new PC. OS: Windows 10 64bits Processing: 3.3.6 I tried the solution from this discussion but an error appears when I type the sdkmanager command

C:\Users\ADMIN\AppData\Local\Android\Sdk\tools\bin>sdkmanager "build-tools;26.0.0"
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 5 more

I've installed jdk-9.0.1

I tried the solution described here:

When asked by Processing,I specified the SDK folder manually to C:\Users\ADMIN\AppData\Local\Android\Sdk

The script starts compiling but I end up with this error

1. ERROR in C:\Users\ADMIN\AppData\Local\Temp\android7555099663370003499sketch\app\src\main\java\processing\test\ac_controller\ (at line 321)
    startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
The method startActivityForResult(Intent, int) is undefined for the type ac_controller
1 problem (1 error)

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\ADMIN\AppData\Local\Temp\android7555099663370003499sketch\app\build.gradle' line: 62

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Process 'command 'D:\Formation\Processing\processing-3.3.6\java\bin\java.exe'' finished with non-zero exit value -1

Any idea on what I'm missing?

Thanks in advance


  • but an error appears when I type the sdkmanager command

    Why are you typing commands? I mean, nothing wrong with typing commands but AFAIK you hit run in Processing under Android mode and Processing runs and load your perfectly functioning app in your phone (or sim). For this to happen, Processing needs to know where the Android SDK is. Now, if you are typing commands manually, tell us what you are doing with these commands... maybe somebody in the forum could address your question.


  • I agree with you! It worked on my previous PC after the first installation without any configuration required.

    This time when I installed Processing and AndroidMode the script did not run saying it's missing the Android SDK. I tried installing SDK manually using I typed sdkmanager "build-tools;26.0.0" but any other command following sdkmanager would result in the same error. That is one problem.

    I then installed Android Studio and tell Processing where to find the SDK from this installation. It stopped telling me to locate the SDK folder but doesn't want to compile the script. Tha is the second and main issue.

    They might be related to the Java configuration but I have no clue.

Sign In or Register to comment.