无法在intellij idea社区版中导入grails 3项目

时间:2018-04-04 03:19:30

标签: grails intellij-idea

我试图在intellij idea社区版中导入grails 3项目

我收到以下错误

java.lang.NullPointerException at 
com.android.tools.idea.project.messages.AbstractSyncMessages.removeMessages(AbstractSyncMessages.java:79) at 
com.android.tools.idea.gradle.project.sync.messages.GradleSyncMessages.removeProjectMessages(GradleSyncMessages.java:50) at 
com.android.tools.idea.gradle.project.sync.idea.notification.GradleNotificationExtension.customize(GradleNotificationExtension.java:57) at 
com.intellij.openapi.externalSystem.service.notification.ExternalSystemNotificationManager.createNotification(ExternalSystemNotificationManager.java:168) at 
com.intellij.openapi.externalSystem.util.ExternalSystemUtil.createFailureResult(ExternalSystemUtil.java:651) at 
com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3$3.onFailure(ExternalSystemUtil.java:517) at 
com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl.onFailure(ExternalSystemProgressNotificationManagerImpl.java:124) at 
com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:94) at 
com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:163) at 
com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:149) at 
com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:542) at 
com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4.run(ExternalSystemUtil.java:605) at 
com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750) at 
com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:434) at 
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157) at 
com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580) at 
com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525) at 
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85) at 
com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144) at 
com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$10(ApplicationImpl.java:565) at 
com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305) at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at 
java.util.concurrent.FutureTask.run(FutureTask.java:266) at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at 
java.lang.Thread.run(Thread.java:745)  
Consult IDE log for more details (Help | Show Log)

3 个答案:

答案 0 :(得分:14)

对我而言,这是一个到JVM的断开(?)链接,使用JAVA_HOME而不是Project JVM解决了这个问题。

答案 1 :(得分:3)

我通过将gradle jvm更改为JAVA_HOME解决了这个问题。

答案 2 :(得分:1)

此问题是由于gradle包装器未在gradle_home中配置而不是引用gradle包装器,如果我手动将gradle设置为本地安装的gradle,则此工作正常。