1
I’m trying to use Cordova for the first time.
I’ve seen the directories the Androidmanifest.xml file and the project.properties file
No Android Studio já instalar os SDK Android para as plataformas 14, 16 e da 20 a 27.
I don’t know what else to do...
This is the give:
C:\Android\Cordova\hello>cordova requirements
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/annota
tion/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(Sc
hemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHa
ndler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinCla
ssLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(C
lassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 5 more
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.1\bin\
gradle
(node:6696) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements
check failed
at C:\Users\julio\AppData\Roaming\npm\node_modules\cordova\src\cli.js:414:27
at _fulfilled (C:\Users\julio\AppData\Roaming\npm\node_modules\cordova\node_
modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\julio\AppData\Roaming\npm\node_module
s\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
when adding android:
*Androidmanifest.xml changed after "Cordova Platform add [email protected]"
I haven’t added android
– Julio Marcelo
C: Android Cordova hello>Cordova Platform ls Installed Platforms: android 7.0.0 Available Platforms: browser ~5.0.1 Ios ~4.5.4 osx ~4.0.1 windows ~5.0.0 www 3.12.0
– Julio Marcelo
@Juliomarcelo like this is your androidmanifest.xml ?
– Guilherme Nascimento
C: Android Cordova hello Platforms android Cordovalib
– Julio Marcelo
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25"/>
– Julio Marcelo
@Juliomarcelo SDK 25 (your target) is for Android 7.1 and not 7.0... a probably vc not installed Android 7.1, or your Cordova is outdated .... Try to remove android
cordova platform remove android
and then add the specific version to 25 with this command:cordova platform add [email protected]
– Guilherme Nascimento
The mistake is the same...
– Julio Marcelo
@Juliomarcelo checked whether the SDK 25 is properly installed in the SDK Manager or not? Check this and then run the commands
cordova platform remove android
cordova platform add [email protected]
again.– Guilherme Nascimento
@Juliomarcelo try 7.1.1, like this:
cordova platform remove android
cordova platform add [email protected]
– Guilherme Nascimento
When I try to add error 7.1.1
– Julio Marcelo
@Juliomarcelo "gives error" is generalizing, but what error after all? Give details
– Guilherme Nascimento
(Ode:7428) Unhandledpromiserejectionwarning: Cordovaerror: Failed to fetch Plat form [email protected]
– Julio Marcelo
@Juliomarcelo edited the answer, read the written part Cordova Support: https://answall.com/a/285337/3635 -- after changing androidmanifest do not forget to run the commands to use version 7.0.0 (api level 24)
– Guilherme Nascimento
also not given already added image
– Julio Marcelo
I put the image on top with what I did, I did the remove after I did the add, then I changed the manifest and in the end I did the Resuscitations and the error is in the image in my initial post, I also already changed target=android-24 in the project properties.
– Julio Marcelo
That’s it. I had java jdk-9.0.4 installed, installed jdk1.8.0_162 and redirected java_home there. Everything is working right now.
– Julio Marcelo