Apk build error

I am trying to build android apk for my application. I have successfully installed java jdk1.7.0_79, using these Instructions (in highest voted answer). My O.S. is Ubuntu 15.10.

When I build apk using both the Jdk (jdk1.7.0_79/80) I get same build error


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)

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
 com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/jdk1.7.0_79/bin/java'' finished with non-zero exit value 1

Note 1) I have updated jdk location after installing each jdk(by removing previously installed jdk), I have no problem in java installation.

2) I have previously resolved rendering error in layout which is also same as "Unsupported major.minor version 52.0" by unchecking Android API 23:N(preview).


Check if your build.gradle(Module:app) has compile

eg: compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:design:23.4.0'

Need Your Help

Fonts works on Safari, not on Google Chrome and Firefox

css font-face

On my website I call a font that is on an other website :

Using Statement with Generics: using ISet<> = System.Collections.Generic.ISet<>

c# generics syntax alias using

Since I am using two different generic collection namespaces (System.Collections.Generic and Iesi.Collections.Generic), I have conflicts. In other parts of the project, I am using both the nunit and