0

I had some issues with Gradle plugin 2.0.0-alpha6 and Gradle 2.10 and solved them by disabling Instant Run (as stated in Android Studio doesn't work fine with gradle 2.10 and gradle plugin 2.0.0-alpha5).

I then updated to gradle plugin 2.0.0-alpha7 without any issue

Today I updated Android Studio to the latest 2.0 Preview 8 version and I got the following error again:

Error:Could not find com.android.tools.build:gradle:2.0.0-alpha7. Searched in the following locations: https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-alpha7/gradle-2.0.0-alpha7.pom https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-alpha7/gradle-2.0.0-alpha7.jar

Now, I see by clicking on those links that the two files don't exist... but, I get the same error if I revert to gradle plugin 2.0.0-alpha5 or 2.0.0-alpha6, do it doesn't make much sense. Is the maven environment down, maybe?

That's quite frustrating. Now, I tried to check whether Instant Run is enabled and I got a surprise: it's disabled and I cannot enable-disable it anymore, since Android Studio doesn't seem to understand I'm building using gradle.

enter image description here

Probably that's because it can't find the Gradle files, therefore doesn't let me enable/disable features that depend on te gradle plugin version. So, I don't know what to do.

I already incremented the max heap size in my build.gradle file

dexOptions {
    incremental true
    javaMaxHeapSize "4g"
}

This is my full build.gradle file (except for some var settings I deleted from it): https://gist.github.com/MarKco/60f4ac63f7cafb783f3a

Community
  • 1
  • 1
Marco Zanetti
  • 4,051
  • 6
  • 32
  • 48

2 Answers2

1

To enable Instant Run again (or at least not greyed out) you have to update to gradle plugin 2.0.0-alpha8. This might also solve your other problems.

Kevin van Mierlo
  • 9,554
  • 5
  • 44
  • 76
0

from the release notes at http://tools.android.com/recent

We've just pushed Android Studio 2.0 Preview 8 to the canary channel, as well as a new version of the Gradle plugin: 2.0.0-alpha8. You'll want to update both; instant run in particular is only enabled when using the latest versions of both:

Therefore try updating the gradle plugin to 2.0.0-alpha8

Kuffs
  • 35,581
  • 10
  • 79
  • 92
  • It worked, thank you! I thought I could find the latest gradle-plugin version here: https://jcenter.bintray.com/com/android/tools/build/gradle/ but apparently I don't... – Marco Zanetti Jan 28 '16 at 11:49