Closed averagenetworkscienceenjoyer closed 1 year ago
Could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
SdkManager is part of the Android development tools. I don't know why this would not be found. Two things to check:
Check the Java version matches the Buildozer install instructions.
Check that the Android license agreements were accepted when Buildozer was first run (If you don't remember delete ~/.buildozer
and build again, type y when prompted).
Thanks for the help Robert.
My java version is openjdk11 so it definitely matches. One thing I forgot to mention is that I am using windows 10 and building through wsl.
I changed the android.accept_sdk_license in my buildozer.spec file to True instead of False, and deleted ~/.buildozer, but when I run buildozer android debug I get the same error.
I think it may have something to do with this warning message when I try to build: # WARNING: Config token app android.sdk is deprecated and ignored, but you set value 25. Also I thought it might help to include some exports in my nano wsl file:
export PATH=$PATH:~/.local/bin export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 export ANDROID_HOME=/usr/lib/android-sdk export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/platform-tools
Let me know if this helps diagnose the issue!
Don't set android.sdk_path
to the Windows SDK path. Either let buildozer download and unzip or use what you exported
HyTurtle thank you! The full build still isn't working but I've got past this particular error, and I think I'll be able to work out the rest! The errors I'm getting now seem to just be about fixing up the versions on my buildozer.spec file. I'll ask something later if it doesnt work again but thank you for now!
I'm going to close this thread now cause I think its complete!
Versions
Description
When I try to build the apk for my app it gives me the following 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
buildozer.spec
Command:
Spec file:
Logs