Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assertion Error in Android Studio when trying to compile the working project

While I was trying to build my working project in the updated Android Studio (0.3.6), I got the below error message. It works fine when I build via CLI.

java.lang.AssertionError
at com.android.tools.idea.gradle.compiler.AndroidGradleBuildProcessParametersProvider.getVMArguments(AndroidGradleBuildProcessParametersProvider.java:101)
at com.intellij.compiler.server.BuildManager.launchBuildProcess(BuildManager.java:921)
at com.intellij.compiler.server.BuildManager.access$1900(BuildManager.java:121)
at com.intellij.compiler.server.BuildManager$11$2.run(BuildManager.java:666)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:37)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:435)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:152)

I already opened the issue here.

However, it only happens to the existing project. Android Studio can build newly created projects.

I am confuse whether this is a bug of Android Studio or is there any setting I need to change to my existing project?

like image 771
Swan Avatar asked Nov 19 '13 04:11

Swan


2 Answers

Here is a better solution so you do not have to import the project again.

Go to: File > Invalidate Caches/Restart and select Invalidate and Restart

like image 76
anirus Avatar answered Oct 21 '22 06:10

anirus


Just remove .idea files from project. And import project again.

like image 35
user2698468 Avatar answered Oct 21 '22 07:10

user2698468