Using cordova on WINDOWS 10 I'm not able to build project.
When I tried cordova requirements
it shows me Android target: not installed
.
I tried all possible solutions over internet and SO, however, none worked for me. Probably this is related to the latest version of cordova v 8.0.0.
I tried the following which did NOT work:
1. overwriting tools folder from cordova CLI in my C:UsersadminAppDataLocalAndroidSdk
folder.
2. cordova platform remove android
and then cordova platform add [email protected]
3. Uninstalling and reinstalling all SDKs in Android Studio.
4. <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
5. Updated config.xml
file with
<platform name="android">
<preference name="android-minSdkVersion" value="16"/>
<preference name="android-targetSdkVersion" value="26"/>
<!--other line code -->
</platform>
- Installed all SDK from SDK manager in Android Studio from 16 to 27.
Following is the log after firing the requirements command:
Android Studio project detected
Requirements check results for android:
Java JDK: installed
Android SDK: installed true
Android target: not installed
cmd: Command failed with exit code 1 Error output:
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.AvdManagerCli.parseSdk(AvdManagerCli.java:328)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:204)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:195)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 6 more
Gradle: installed
Please suggest a solution to fix this issue.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…