Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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

Or update The SDK Build Tools, in Android SDK.

Worked for me.

You can try this :

Invalidate caches

Screenshot

When I upgraded to android studio 4.2.1 then getting this kind of error and after searching on SO I found solution some where.

I run following command in android studio terminal when getting this error:

taskkill /F /IM java.exe
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top