Intellij Idea import gradle project error - “Cause: unexpected end of block data”

前端 未结 9 561
一向
一向 2020-12-19 02:02

While importing project as gradle have error Cause: unexpected end of block data. Project has several modules. I\'m using Idea 132.719 and 1.8 gradle.

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-19 02:56

    I see in your comments, @SergeyB, that deleting .gradle in your user dir didn't help, but these steps resolved my issue (which had similar symptoms):

    • Delete .gradle directory from user dir (\Users\Mark.gradle)
    • Delete GRADLE_HOME environment variable, if it's set
    • Delete "manual" installs of Gradle (which shouldn't be needed, since Gradle will automatically download the necessary files when you run the gradlew wrapper)
    • Run "gradlew" from command-line, and confirm that new files are downloaded
    • Run a gradle build from the command-line (e.g., "gradlew clean assemble")
    • If you get an SDK version mismatch error, such as "failed to find target android-18", be sure to download the corresponding Android SDK (which can be done via the SDK Manager in Android Studio)
    • Once you can build from the command-line, try again from within the IDE

提交回复
热议问题