Ionic 2.0.0-beta.32 - run android faild

Hi, I have made new install on Windows 10 and I’m not able no lunch my app. (ionic serve work well).

Informations:
Os: Windows 10 64x
Platform: Android
Version: ionic@beta

ionic info
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
OS:
Node Version: v6.2.0

:compileDebugJavaWithJavac
Note: D:\Apps\ionic2\test2\platforms\android\src\org\apache\cordova\splashscreen\SplashScreen.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.



:compileDebugNdk
 UP-TO-DATE

:compileDebugSources


:transformClassesWithDexForDebug
java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0

 FAILED

        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"


BUILD FAILED

Total time: 11.813 secs


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\Java\jdk1.7.0_79\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.

Error: Error code 1 for command: cmd with args: /s,/c,"D:\Apps\ionic2\test2\platforms\android\gradlew cdvBuildDebug -b D:\Apps\ionic2\test2\platforms\android\build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

Caught exception:
 undefined

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

I have already find the lasted version of nodejs has a problème… but I have same problème with nodejs 4.4.6. I try to unistall and reinstall ionic@beta and cordova
I’ve got this error with all application, new, already exist.

This is the complete error, your help will be verry appreciate!

Is adb installed correctly?

ADB work correctly. I have try a simple test with Android Studio, and build work on my phone. And Gap Debug see my phone too.

Thanks for you help.


I have try both on Windows 10 and Mac OSX i’ve got exactly same error.

Nobody have an idea?
Thanks you,

I ran into this exact same problem last week. Can’t remember how i fixed it though.

Is everything in ADB up-to-date? Tried re-adding the platform?

1 Like

Hi, sorry for delay, I have work on other project.
I have solving the problem with remove last java jre … keep 1.7 not 1.8.

Thanks