Ich versuche, einfache Cordova Probe zu erstellen und folgte Schritt unten. Wenn ich Plattform hinzufüge, zeigt es den Fehler an, der "nicht unterstützte Major.minor Version 52.0" angezeigt wird. Bitte helfen Sie dabei. Danke im Voraus.Cordova Add-Plattform mit einer Ausnahme fehlgeschlagen Nicht unterstützte Major.Minor Version 52.0
Schritte:
1.Installing cordova von NPM installieren -g cordova 2. erstellt eine App von cordova create hallo com.example.hello Hello World 3. Versucht, Android-Plattform von cordova Plattform add android
Um den fehler zu beheben versucht, installieren android sdk 23, 24 und 25 4.also auch cordova anforderungen es zeigt grandle installiert.
Ich entfernte Plattform Android und versuchte es erneut hinzuzufügen habe diesen gleichen Fehler
Fehler:
cordova platform add android
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.example.hello
Name: HelloWorld
Activity: MainActivity
Android target: android-24
Subproject Path: CordovaLib
Android project created with [email protected]
Installing "cordova-plugin-whitelist" for android
ANDROID_HOME=C:\Users\Richa\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jre7
Subproject Path: CordovaLib
FAILURE: Build failed with an exception.
* Where:
Build file 'G:\Pogeyan\Projects\cordova test\sample\hello\platforms\android\build.gradle' line: 20
* What went wrong:
A problem occurred evaluating root project 'android'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.76 secs
Failed to install 'cordova-plugin-whitelist':Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (G:\Pogeyan\Projects\cordova test\sample\hello\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Error: cmd: Command failed with exit code 1
Knoten Version: V4.4.7
Cordova Version: 6.4. 0
Überprüfen Sie Ihre jdk-Version. Wenn es alt ist, aktualisieren Sie es auf 1.8 – young
Es ist ein Problem mit 'Cordova Version 6.4.0', siehe Antwort von mir [hier] (http://Stackoverflow.com/a/41427344/3840093), Downgrade der Version wird Ihnen helfen . –
@selvan downgrade Cordova-Version ist keine gute Idee. Funktioniert für mich mit Cordova 6.4.0 Nach dem Upgrade von Cordova, erstellen Sie ein neues Projekt mit Cordova Befehl erstellen und versuchen, Android-Plattform – Gandhi