

What went wrong: Execution failed for task ‘:app:compileDebugJava’. Laptop-2:MyApplication2 stef$ gradle -stacktrace build :app:preBuild :app:compileDebugNdk UP-TO-DATE :app:preDebugBuild :app:checkDebugManifest :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:compileDebugJava FAILED HOW IS GRADLE DETERMINING THE JDK TO USE?!?!? You can see that it is hitting up JDK1.6 even though, as described above, everything else in the world points to JDK1.7

but I tried installing standalone gradle and building the project from the commadn line - it still fails, but I can get more info. I dont know if anyone is still reading this. Almost certainly this is some bizarre interaction between gradle and this particular mac setup - some obscure OSX/java related issue about how Gradle finds the compiler or something….
ANDROID STUDIO MAC JAVA 7 ANDROID
Ps: I am running Android Studio at work and have installed jdk1.7 and I have no issues. WHY DOES MY ENTIRE SYSTEM EXCEPT AGREE THAT JDK1.7 IS BEING USED, EXCEPT FOR GRADLE?!?!?! Which posts like this one say is also related to the JDK1.7 being required.

SIMILARLY, in ECLIPSE when running a different (libgdx) gradle-based project, the build process fails with this error:Ĭom/github/jtakakura/gradle/plugins/robovm/RoboVMPlugin : Unsupported major.minor version 51.0 I have even manually set the symlink CurrentJDK to the 1.7JDK as I have seen that offered as a solution a few times - no luck. Gives: java version “1.7.0_60-ea” Java™ SE Runtime Environment (build 1.7.0_60-ea-b15) Java HotSpot™ 64-Bit Server VM (build 24.60-b09, mixed mode) Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home In Android Studio I have set file->other settings->default project settings-> JDK location to the JDK location listed below in JAVA_HOME. Its just that for some reason, on one machine, Android Studio / Gradle pops this error message.

The setup is the same as far as I can tell. On my other mac, I dont have any problems. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.
ANDROID STUDIO MAC JAVA 7 INSTALL
Android studio works with the Apple provided JDK1.6, but when I install Oracle JDK1.7, which is required for the projects I am doing, it bombsĮrror:Execution failed for task ‘:app:compileDebugJava’. In Android Studio and Eclipse I am having issues with the gradle-build bombing out with errors that the web tells me are related to the JDK. This issue appears to be related directly to a bizarre gradle/osx interaction, rather than the IDEs using Gradle.
