Errors executing Cordova commands | windows 10


#1

the android emulator is runned but the application was not build. I’m using windows 10

C:\Users\Houssem\Desktop\test3>meteor run android
[[[[[ C:\Users\Houssem\Desktop\test3 ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Started your app.

=> App running at: http://localhost:3000/
   Type Control-C twice to stop.

=> Errors executing Cordova commands:

   While running Cordova app for platform Android with options --emulator:
   Error: Command failed: C:\Users\Houssem\Desktop\test3\.meteor\local\cordova-build\platforms\android\cordova\run
   --emulator --emulator
   java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : 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"
   java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : 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"
   java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : 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"

   FAILURE: Build failed with an exception.

   * What went wrong:
   Execution failed for task ':transformClassesWithDexForDebug'.
   > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command
   'C:\Program Files (x86)\Java\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 1

   * Try:
   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
   java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : 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"
   Error code 1 for command: cmd with args:
   /s,/c,"C:\Users\Houssem\Desktop\test3\.meteor\local\cordova-build\platforms\android\gradlew cdvBuildDebug -b
   C:\Users\Houssem\Desktop\test3\.meteor\local\cordova-build\platforms\android\build.gradle -PcdvBuildArch=x86
   -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" undefined
   at ChildProcess.exitCallback (C:\tools\utils\processes.js:151:23)
   at ChildProcess.emit (events.js:98:17)
   at Process.ChildProcess._handle.onexit (child_process.js:820:12)

C:\Users\Houssem\AppData\Local\.meteor\packages\meteor-tool\1.3.5_1\mt-os.windows.x86_32\isopackets\cordova-support\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:165
      throw error;
            ^
ExitWithCode:1

#2

Having the same issue, its something to do with the JDK version. What and how to fix it I have not found yet.


#3

This may sound very strange but go into android studio and remove Android SDK build tools 24. Not sure why but this solves the issue.


#4

Thanks man. It’s working. Is it a bug on android SDK?