Plugin development for Android Studio

Completed

I have developed a plugin which should be used in Android Studio. Gradle runIde task works fine if alternativeIdePath is not set. But whenever I set it to --> alternativeIdePath "/Applications/Android Studio.app/Contents/" it fails with the following error below. I also tried alternativeIdePath "/Applications/Intellij IDEA CE.app/Contents/". I'm not sure what the issue is. Any help will be greatly appreciated.

What went wrong:
Execution failed for task ':runIde'.
> java.lang.NullPointerException (no error message)

at org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection.<init>(DefaultConfigurableFileCollection.java:51)
at org.gradle.api.internal.file.DefaultProjectLayout.configurableFiles(DefaultProjectLayout.java:170)
at org.gradle.api.internal.project.DefaultProject.files(DefaultProject.java:865)
at jdk.internal.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jetbrains.intellij.tasks.RunIdeTask.configureClasspath(RunIdeTask.groovy:134)
at org.jetbrains.intellij.tasks.RunIdeTask.exec(RunIdeTask.groovy:123)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:794)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:761)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59) .....
0
2 comments

Hi Paul,

I cannot recreate this. Please specify the version of gradle-intellij-plugin you use and attach sample project for recreating this if possible.

0

Hi Alexander,

I was able to solve this issue by changing my the plugin project SDK from java10 to java8. Thanks

0

Please sign in to leave a comment.