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 is Kotin
.
I use JDK 13
and Android Studio 3.6.1
and the latest Android SDK.
8 Answers
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.

- 10,420
- 10
- 72
- 100
https://developer.android.com/studio/intro/studio-config.html#jdk Use Jdk 8 as mentioned in above link.

- 559
- 1
- 5
- 17
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).

- 1,030
- 3
- 17
- 29

- 1,007
- 11
- 20
Change your JDK
version by following steps in Android Studio:
File-> Project Structure -> SDK
location -> Gradle
Settings
Then select the configured JDK
version.

- 1,217
- 12
- 22
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

- 2,738
- 4
- 20
- 46

- 71
- 1
- 3
I solved it change the version of Gradle on Project Structure options. I imagine it will also work by configuring old versions

- 73
- 6
-
you suggest to use which version? – Y.R Mar 02 '20 at 12:34
-
I try with the newest for my new project Gradle version 6.2.1 – Carlos Rguez M Mar 02 '20 at 17:12
-
Try invalidate cache and restart and rebuild project after apply the config change – Carlos Rguez M Mar 04 '20 at 08:39
I got this error while creating a new project, so I am telling solution for the case, if you are creating a new project and you got this error, then below mentioned solution will definitely work for you.
Condition : Check your project's name if it is having any special characters like ',#,@ etc.
Solution : Just remove any special character from the project's file name and that's it.

- 19,824
- 17
- 99
- 186

- 43
- 6
I also got this error while creating a new project in a newly installed Android Studio, So i am sharing my solution- If you have installed the very latest version of Android Studio then try installing the older version. In my case i installed version 4.1.2 and was not able to make gradle work. So i uninstalled 4.1.2 version and tried 3.6 version and it worked without any issues.

- 1