DEV Community

Discussion on: React Native android build failure

Collapse
 
sainig profile image
Gaurav Saini • Edited

Hi Arun,
I tried running the accept licenses command (the same command that is mentioned in the link you provided) already, but got another error as shown in the second screenshot in my post above
Here's the full exception when running the accept licenses command

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:602)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 5 more
Collapse
 
arung86 profile image
Arun Kumar G

what if you try opening the sdk manager GUI and accept manually?

Thread Thread
 
sainig profile image
Gaurav Saini

Yes, I tried that, but that didn't work also. Fortunately I found the issue, I was looking in the wrong place, I had downloaded sdk version 30 from Android Studio, but the project was using sdk version 28.
I downloaded the SDK version 28 also and then it worked fine.
Thanks