I was trying to import grails 3 project in intellij idea community edition
I am getting below error
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)
Support for the Grails framework is not bundled with IntelliJ IDEA. You can install the Grails plugin from the JetBrains repository as described in Install plugins. The latest compatible version of IntelliJ IDEA is 2021.3. You can find the documentation for Grails support in earlier versions of IntelliJ IDEA Help.
Launch IntelliJ IDEA. If the Welcome screen opens, press Ctrl+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup. Otherwise, from the main menu, select File | New | Project from Existing Sources.
I right clicked on the application and went to Grails -> Change SDK Version. I chose the version I wanted, then IDEA asked me if I wanted to upgrade the application. Clicked yes and all was good.
For me it was a broken (?) link to the JVM, using JAVA_HOME instead of Project JVM solved the issue.
I solved this by changing the gradle jvm to JAVA_HOME.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With