Error:Execution failed for task ':caldroid:compileDebugJavaWithJavac'. > Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.
priyankapc opened this issue · comments
Hello ,
I have downloaded code and trying to import in android studio. But I am not able to build apk. its giving me error
**.Error:Execution failed for task ':caldroid:compileDebugJavaWithJavac'.
Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.**
Hi,
I am also facing same issue. whereas I am compiling android using iotivity framework. My error message below.
processDebugJavaRes UP-TO-DATE
:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.
-
Try:
Run with --info or --debug option to get more log output. -
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileDebugJavaWithJavac'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
Things to do to get result:
- Change the build gradle version in project level -> (based on your android version)
- Change the Target and Min SDK versions
- Under gradle -> In gradle wrapper properties change distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip.