Reputation: 448
I try to create gradle project on Intellij, although I'm ensured that I chose JDK 8 but it gives me an error. I use windows 10 & unfortunately most of the questions have been asked concerning android on Stackoverflow. grateful for the help.
I mention error hereunder:
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Upvotes: 2
Views: 17240
Reputation: 106
in my case the problem was that i created a common android-library.gradle script and used this sintax,
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}
when tried to apply the script to other gradle scripts i got the same error the solution was to replace with
apply plugin: 'com.android.library'
apply plugin: 'org.jetbrains.kotlin.android'
Upvotes: 3
Reputation: 352
I got this same error. If you check the whole exception (one level before that one - in the Build panel), maybe it will give you the correct exception. In my case, it was "General error during semantic analysis: Unsupported class file major version 60 in java.".
I have changed the Gradle version in gradle-wrapper.properties
file to 7.2v (distributionUrl=https://services.gradle.org/distributions/gradle-7.2-bin.zip) and it worked fine.
Upvotes: 4