Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio doesn't work fine with gradle 2.10 and gradle plugin 2.0.0-alpha5

I use com.android.tools.build:gradle:2.0.0-alpha3 and gradle 2.8 before I update to Android Studio 2.0 preview 5. It works fine.

After I update to 2.0 preview 5,it tells me to update to com.android.tools.build:gradle:2.0.0-alpha5 and gradle 2.10.

I can't build and run my app normally now. It always uses a old copy of my code though I have changed the code and costs more time to build.

If I turn back to com.android.tools.build:gradle:2.0.0-alpha3 and gradle 2.8.It become right.

Android Studio Version (http://tools.android.com/recent)

Android Gradle Plugin Version (http://tools.android.com/tech-docs/new-build-system)

Android Studio Preview 6 was posted on Jan 21, 2016. Android Studio Preview 7 was posted on Jan 23, 2016.

You can see that the Android Studio Preview updates frequently. If you don't want to deal all kinds of bugs, you would better to use a stable version.

If you want to use more features, you should always keep latest version to avoid bugs.

like image 211
tiny sunlight Avatar asked Jan 21 '16 03:01

tiny sunlight


People also ask

What Gradle version works with Java 17?

Support for Java 17 As of Gradle 7.3, both running Gradle itself and building JVM projects with Java 17 is fully supported.

Why is Gradle not working?

In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.

Which Gradle is compatible with Java 11?

0+ requires Java 11 to build app #2067.


1 Answers

There's a quick fix listed on google plus by the android dev team in the comments (post).

Set dexInProcess equal to false in your build.gradle:

dexOptions {  
    javaMaxHeapSize "4g"  
    dexInProcess false  //the magic line
}
like image 163
ShadowRogue7 Avatar answered Oct 15 '22 16:10

ShadowRogue7