今天導入別人的項目時遇到了這個問題。
1、打開Termianl ,輸入命令 gradlew compileDebug --stacktrace
這個之後,會顯示一些具體出錯的信息。
2、我遇到的錯誤信息是
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap
將gradle.properties中的
org.gradle.jvmargs=-Xmx1024m
改成了
org.gradle.jvmargs=-Xmx512m