Processing compilation error with AndroidMode 4.0

edited January 2018 in Android Mode

Hi,

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 https://forum.processing.org/two/discussion/25689/can-t-get-processing-to-see-the-sdk#latest 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
        at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
        at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
        at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
        at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
        at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
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: https://forum.processing.org/two/discussion/25836/problem-with-installing-android-sdk#latest

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\ac_controller.java (at line 321)
    startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
    ^^^^^^^^^^^^^^^^^^^^^^
The method startActivityForResult(Intent, int) is undefined for the type ac_controller
----------
1 problem (1 error)
 FAILED

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

Answers

  • 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.

    Kf

  • 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 https://forum.processing.org/two/discussion/25654/trouble-connecting-android-mode-4-0-to-sdk 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.