IntelliJ android app artifact java.lang.assertionError

814 views Asked by At

I have followed android tutorial on making apps and finished first section and wanted to export result to mobile phone.

However, when I try to build artifact in intelliJ I get following error:

Error:Internal error: (java.lang.AssertionError) Unexpected node 
Android Packaging; nodes=[Module 'AndroidApp' production, Module 'app'java.lang.AssertionError: Unexpected node Android Packaging; nodes=[Module 'AndroidApp' production, Module 'app' production, Module 'myapplication' production, Module 'app' tests, Resources for 'app' production, Resources for 'app' tests, Artifact 'unnamed', Artifact 'app', gradle-resources-production:AndroidApp, gradle-resources-production:app, gradle-resources-production:myapplication, gradle-resources-test:AndroidApp, gradle-resources-test:app, gradle-resources-test:myapplication, Android Gradle Build Target]
at com.intellij.util.graph.GraphGenerator.buildOuts(GraphGenerator.java:55)
at com.intellij.util.graph.GraphGenerator.<init>(GraphGenerator.java:36)
at com.intellij.util.graph.GraphGenerator.create(GraphGenerator.java:40)
at org.jetbrains.jps.builders.impl.BuildTargetIndexImpl.initializeChunks(BuildTargetIndexImpl.java:87)
at org.jetbrains.jps.builders.impl.BuildTargetIndexImpl.getSortedTargetChunks(BuildTargetIndexImpl.java:51)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:675)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:387)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:194)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:294)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
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)

I have found one person asking the same question here:

same question

but his solution did not work for me. How can I fix this and what is the problem here ?

Thanks

1

There are 1 answers

1
MayTheSchwartzBeWithYou On

Had a similar problem. Switched to Android Studio. No problems. It's a customised version of IntelliJ. It's great for Android dev and helps you manage a lot of the problems.

Find it here https://developer.android.com/studio/index.html