syncing : Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed error in syncing.... androidstudio 3.6.1
Solution 1
https://developer.android.com/studio/intro/studio-config.html#jdk Use Jdk 8 as mentioned in above link.
Solution 2
In short
Set the JDK version to Embedded JDK
WHY?
A copy of the latest OpenJDK comes bundled with Android Studio 2.2+. This is the JDK version GOOGLE recommend.
To use the bundled JDK, do the following:
HOW?
Android Studio > Preferences... > Build, Execution, Deployment > Build Tools > Gradle Under Gradle JDK, choose the Embedded JDK option. Click OK.
For windows
select File > Settings... > Build, Execution, Deployment > Build Tools > Gradle Under Gradle JDK, choose the Embedded JDK option.
Solution 3
I'm too late, but it helps someone.
I got the same problem when I installed Android Studio 4.2.1 in Windows 10. I fixed it by selecting the JDK location. Open File > Project Structure. Then select the SDK Location tab (on the left). On the JDK location section, select Embedded JDK: option (the first one).
Look at this picture:
It worked in my case. Also, I'm using the latest Gradle Version (6.7.1) and Android Gradle Plugin Version (4.2.1).
Solution 4
I also experienced the same, I tried changing the JDK version.
- File -> Setting -> Build, Execution, Deployment -> Build Tools -> Maven -> Gradle
- Gradle JVM -> Download JDK
and I set it as below
Solution 5
I solved it change the version of Gradle on Project Structure options. I imagine it will also work by configuring old versions
![Y.R](https://i.stack.imgur.com/o0Mxl.jpg?s=256&g=1)
Comments
-
Y.R almost 2 years
I did not work with my
Android Studio
up today. when I build my project and I synced it , it said :Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
I did not change anything in the project and the language of the project isKotin
. I useJDK 13
andAndroid Studio 3.6.1
and the latest Android SDK. -
Y.R about 4 yearsI used JDK-8 and my problem was solved.... thank you for your answer