Android Question SDK Manager v3.31 (B4A v9.01) error

Status
Not open for further replies.

Pendrush

Well-Known Member
Licensed User
Longtime User
I get this error, on SDK Manager start, same error when I click on refresh button.
Manager is working fine, beside error.
SDK Manager v3.31.png
 

dragonguy

Active Member
Licensed User
Longtime User
i facing same error too
B4X:
Error: Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
Caused by: java.lang.ClassNotFoundException: com.android.sdklib.tool.sdkmanager.SdkManagerCli
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Error from SDK Manager v3.32. Error is start to appear after upgrade to B4A v9.01:
Error: Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
I have both Java 8 and OpenJDK 11. B4A use OpenJDK 11.
From B4J log:
DataFolder: C:\Users\XXXXX\AppData\Roaming\B4ASdkManager
Java Path: C:\Program Files\Java\jdk1.8.0_102\jre
Error when running v3.32 from B4A Tools -> SDK Manager:
Error: Error: Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
Caused by: java.lang.ClassNotFoundException: com.android.sdklib.tool.sdkmanager.SdkManagerCli

If I debug SDK Manager in B4J error is triggered in the Main module on line 318:
Sucess = True, ErrorCode = 1
 
Last edited:
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Your Java path under tools should point to the BIN folder not the jre folder
eg. C:\Program Files (x86)\Java\jdk1.8.0_201\bin\javac.exe
My path is OK, I will not be able to compile app.
Also change path to OpenJDK got similar error when starter from B4A described in my previous post.
 
Upvote 0

coldteam

Active Member
Licensed User
Longtime User
I got this error. rolled back to 9.0 but that didn't help. Now I have reinstalled android sdk and it works.
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
This is result while trying to install SDK from scratch, error on SDK manager start:
Error: 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(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Error with Ready to run SDK:
Error: 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(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I see the problem. It should work properly if you are using the latest version of Android SDK (build tools 26.0.0)

I will make an update to B4A so it won't break older versions of the SDK. sdkmanager.bat and avdmanager.bat from version 25.3.1 are attached. You can use them if you want to keep the old version of Android SDK with Java 8.
 

Attachments

  • sdkmanager.zip
    2.3 KB · Views: 259
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
SDK Manager v3.33 (B4A v9.0.1.1) work properly with path set to Java 8, but still get same error with OpenJDK 11.
How can I get the latest version of Android SDK (build tools 26.0.0)?

EDIT:
My latest installed build tools inside SDK Manager is Android SDK Build-Tools v27.0.1.
 
Last edited:
Upvote 0
Status
Not open for further replies.
Top