2017-07-30 210 views
0

我剛開始學習科爾多瓦,我無法通過requirements step科爾多瓦要求失敗

科爾多瓦V7.0.1

的Android 2.3.3工作室

我不知道都怎麼辦。我認爲我安裝了一切正確。

$ cordova requirements 

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: 
java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/AvdManagerCli : Unsupported major.minor version 52.0 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) 
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) 
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) 
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425) 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358) 
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) 
Exception in thread "main" 
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\gradle 
Error: Some of requirements check failed 

回答

0

不受支持的版本MAJOR.MINOR 52.0

手段的Java字節碼8,這意味着搖籃中運行的是舊版本的JVM。您應該檢查java -version以查看默認JVM的內容,並可能更新JAVA_HOME環境變量,以便使用Java 8 JDK。

+0

就是這樣。我只是按照這些步驟來添加系統變量:https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html –