0

So now that Android O is available via OTA update, I want to move compileSdkVersion to 26, buildToolsVersion to 26.0.1, etc.

When I move my support library references to 26.0.1, however, I get "failed to resolve" errors.

There are several existing answers pointing out the need to add 'https://maven.google.com' to the list of Maven repositories in one's build.gradle file. I have already done that -- to no avail.

Has anyone gotten this to work with Android Studio 2.3.3 and the experimental Gradle plugin (latest version, com.android.tools.build:gradle-experimental:0.9.3)?

Jess Holle
  • 633
  • 5
  • 15
  • I haven’t, but I do have it working on 3.0-canary. What *I* would do, is create a 3.0-canary project *and* “compare” the gradle files, because there seem to be quite a lot of differences. (create the same project with the same name on AS 2.x and compare). – Martin Marconcini Aug 30 '17 at 16:41
  • The maven.google URL appears in your Project's gradle (not the module where you add dependencies) under: `allProjects { repositories { maven { url 'https://maven.google.com’ } } }` (also contains `mavenCentral()`) – Martin Marconcini Aug 30 '17 at 16:45
  • Worth noting that my project is Kotlin (so there are differences there as well). – Martin Marconcini Aug 30 '17 at 16:50
  • Post your build.gradle and the error – Gabriele Mariotti Aug 31 '17 at 07:07

1 Answers1

0

It turns out that a colleague noticed What's the difference between buildscript and allprojects in build.gradle? -- and that the https://maven.google.com repository was listed in the buildscript repository list rather than in the allprojects repository list.

Once that was addressed the previous answers to this question around configuring to obtain Google support libraries via Maven work just fine.

Jess Holle
  • 633
  • 5
  • 15
  • I went ahead and marked this as a duplicate because if I'd read carefully I'd have noticed the allprojects vs. buildscript discrepancy. – Jess Holle Aug 31 '17 at 17:26