Testing sample app on android SDK


#1

I just downloaded ‘cutePuppyPics’ by running ionic start cutePuppyPics --v2

I haven’t touched the project in any form, it is brand new and downloaded straight from the server

I’m testing for android and getting this error:

I ran ‘ionic run android’

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\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.
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: Error code 1 for command: cmd with args: /s,/c,"C:\Programming\cutePuppyPics\platforms\android\gradlew cdvBuildDebug -b C:\Programming\cutePuppyPics\platforms\android\build.gradle -PcdvBuildArch=x86 -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

Help greatly appreciated


#2

What were the exact series of command you ran?
It’s a native build error so theres something not setup correctly with cordova and android.

Please provide the output from ionic info.