Android Studio Requires rebuild every run

1.6k views Asked by At



Android Studio is giving me an absolute nightmare!
Every build I attempt probably has a 15% chance of actually compiling correctly and installing on my device. I have to use Log.d to see if the changes actually are running! (FYI: It definitely drives someone insane!)

The only way to get reliable builds is to hit "rebuild project" before every run - but it takes huge amounts of time and human patience :O - to do this every build.

I have read similar threads on stack overflow, but they all deal with older versions of Android Studio and don't really apply to my version. I have upgraded from 1.1 to 1.2 and finally to a beta 1.3 release - the same symptoms still apply.

Offline mode does not help, nor does messing with Gradle files.. Could it have something to do with R.java issues? I am not sure.

Any thoughts?

Regards,
Droideh

1

There are 1 answers

1
strike On

Boosting your Gradle Script with the help of following:

Upgrade to Gradle 2.4

add the following at the end of your root build.grade script.

task wrapper(type: Wrapper) {
    gradleVersion = '2.4'
}

change gradle properties

org.gradle.daemon=true
org.gradle.parallel=true

For complete update on gradle please go through official post