Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio java

We Are Going To Discuss About Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio java. So lets Start this Android Article.

Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio java

How to solve Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio java

I had same issue and I changed 2 things and solved problem.
File -> Project Structure -> SDK Location and click “JDK location was moved to Gradle Settings.” Then, select “Android studio default jdk version (version 11)” and apply. First step is done.
File -> Project Structure -> Modules, make sure Source Compability and Target Compability is “$JavaVersion.VERSION__11” and apply.
I use Kotlin version is 1.6.10, it may also important.

Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio java

I had same issue and I changed 2 things and solved problem.
File -> Project Structure -> SDK Location and click “JDK location was moved to Gradle Settings.” Then, select “Android studio default jdk version (version 11)” and apply. First step is done.
File -> Project Structure -> Modules, make sure Source Compability and Target Compability is “$JavaVersion.VERSION__11” and apply.
I use Kotlin version is 1.6.10, it may also important.

Solution 1

I had same issue and I changed 2 things and solved problem.

  1. File -> Project Structure -> SDK Location and click “JDK location was moved to Gradle Settings.” Then, select “Android studio default jdk version (version 11)” and apply. First step is done.

  2. File -> Project Structure -> Modules, make sure Source Compability and Target Compability is “$JavaVersion.VERSION__11” and apply.

I use Kotlin version is 1.6.10, it may also important.

Original Author yagmurerdogan Of This Content

Solution 2

you can change implementation ‘androidx.appcompat:appcompat:1.4.0’ to implementation ‘androidx.appcompat:appcompat:1.3.1’

Original Author Huseyn Iskenderov Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment