jake
I am using Java 13. I downloaded gradle 6.0 rc-1 and it seems the java problem at least is fixed in this version of gradle. I have a different related problem I hope you can help me with. When I do the gradlew build command I am getting this error (I have not yet added the java code nor attached an android phone to the computer):
> Configure project :app
Checking the license for package Android SDK Build-Tools 27.0.3 in C:\Users\HP\AppData\Local\Android\Sdk\licenses
Warning: License for package Android SDK Build-Tools 27.0.3 not accepted.
Checking the license for package Android SDK Platform 25 in C:\Users\HP\AppData\Local\Android\Sdk\licenses
Warning: License for package Android SDK Platform 25 not accepted.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ‘:app’.
> Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-25 Android SDK Platform 25
build-tools;27.0.3 Android SDK Build-Tools 27.0.3
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/stud…
Using Android SDK: C:\Users\HP\AppData\Local\Android\Sdk
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/6.0…
BUILD FAILED in 1s
***
I am guessing because the target SDK in the sample code is android 25 but I don’t have that installed? In sdk/sources and sdk/platforms folder, I have a subfolder called android-29, so I guess this is the one I have installed. I am using the SDK location set up by android studio, but downloaded gradle 6.0 separately for command line compiling.
Anyway I can’t find SDK manager.exe in the sdk folder to install the other versions. I tried running sdkmanager.bat in sdk/tools/bin but it gives me the following 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:604)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
… 5 more
I am assuming my version is not compatible with Java 13. Android studio is too slow on my computer so I cannot use SDK manager through android studio either. Is there any way to launch sdk manager without using android studio so that I can download the required sdk packages? Do you think it’s worth downgrading Java to 8 (or may be just 12)? I don’t know enough about this topic to know if downgrading java will make any difference, so I was looking for a more professional opinion.