27

Gradle build-info.xml not found for module app. Please make sure that you are using gradle plugin gradle:2.0.0-alpha or greater

I'm using the gradle plug in gradle:2.0.0-beta2. I randomly get this warning and after this very often either the app is not updated or it crashes. It is enough to clean and rebuild to fix the issue.

Is there any better way to fix it?

jayeffkay
  • 1,229
  • 1
  • 16
  • 22
kingston
  • 11,053
  • 14
  • 62
  • 116
  • I'm getting the same with gradle:2.0.0-beta5. I can install using adb but not from Android Studio. – riper Feb 19 '16 at 14:14
  • @riper did cleaning help? – kingston Feb 20 '16 at 14:39
  • nope! I've noticed however that it installs fine, I just need to launch it manually on device, still annoying though! Since very few seem to have this problem I assume it's not related to the android gradle plugin beta versions. – riper Feb 22 '16 at 13:42

6 Answers6

47

For me it happens on the Mac, but on Windows it works fine all the time. Ever since I updated Android Studio to version 2.0 beta, the issue was still present until official 2.0 Android Studio version.

What helped was disabling Instant Run in Android Studio -> Preferences (search for "instant run" or) -> "Build, Execution, Deployment" -> Instant Run -> Enable Instant Run -> turn off

Mr-IDE
  • 7,051
  • 1
  • 53
  • 59
Balki
  • 688
  • 6
  • 9
  • 1
    This did the trick for me. Not only did I see the error message reported by kingston. I also saw that Android Studio refused to install the app onto the device when I tried to debug. Turning off Instant Run per @Balki's instructions did the trick. – Coder Roadie Apr 30 '16 at 05:28
  • happened to me today on Windows, same solution still work nowadays... even with AS 2.1.2 release and Gradle 2.10 ... – Darkendorf Jun 21 '16 at 16:16
14

run->clean and re-run the app. done my job.

impathuri
  • 574
  • 6
  • 21
3

Try removing other gradle versions from studio. Let's say you have gradle 2.10 running and also have 2.8 install, the gradle wrapper behaves unexpectedly in this case. Therefore we have to clean and rebuild every time.

This works in mine case; hope in yours' too. :)

Anurag
  • 1,162
  • 6
  • 20
0

I modified the build.Gradle of project as:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.+'

        // using 2.+ will solve the problem
    }
}
T D Nguyen
  • 7,054
  • 4
  • 51
  • 71
  • 2
    Mmm to use + isn't a good idea in general. It makes the builds of a given version of the code not repeatable – kingston Apr 13 '16 at 07:41
0

I experienced the same warning/error and learned that in my case it was caused by missing or incorrectly configured .idea files.

More specifically, make sure your "gradleHome" in .idea/gradle.xml is pointing at the right location:

.idea/gradle.xml

<option name="gradleHome" value="C:\Program Files\Android\Android Studio Canary\gradle\gradle-2.10" />

If the problem persists, ensure you app modules is correctly configured:

.idea/modules.xml

<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
0

I had the same problem. In my case, I had to do File -> Settings -> Build, Execution, Deployment -> Compiler and then check Use in-process build.

josh798
  • 78
  • 8