Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.0 Canary 9 - Failed to resolve packages

Tags:

android

I'm getting several errors within Android Studio 3.0 Canary 9. These errors are "Failed to resolve:" the android packages, some listed below. I just installed all the extra packages for the SDK and I'm still getting a gradle build error:

Error:(82, 13) Failed to resolve: com.android.support:multidex:1.0.2
Error:(85, 13) Failed to resolve: com.android.support:support-v13:26.0.0
Error:(89, 13) Failed to resolve: com.android.support:recyclerview-v7:26.0.0
Error:(97, 24) Failed to resolve: com.android.support.test:runner:1.0.0

and a few more packages relating to testing and the support libraries.

Here is my build script:

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
        classpath 'com.google.gms:google-services:3.1.0'
        classpath 'com.google.firebase:firebase-plugins:1.1.1'
    }
}

I'm really not sure why this is failing to build. I just updated all the packages and all the support libraries are the same at the 26.0.0 --> compileSdkVersion 26

Thank you very much for any suggestions!

[EDIT] - Here is my gradle build log

Error:Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find com.android.support:multidex:1.0.2.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/multidex/1.0.2/multidex-1.0.2.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/multidex/1.0.2/multidex-1.0.2.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/multidex/1.0.2/multidex-1.0.2.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/multidex/1.0.2/multidex-1.0.2.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/multidex/1.0.2/multidex-1.0.2.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/multidex/1.0.2/multidex-1.0.2.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/multidex/1.0.2/multidex-1.0.2.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/multidex/1.0.2/multidex-1.0.2.jar
      https://jcenter.bintray.com/com/android/support/multidex/1.0.2/multidex-1.0.2.pom
      https://jcenter.bintray.com/com/android/support/multidex/1.0.2/multidex-1.0.2.jar
  Required by:
      project :app
> Could not find com.android.support:support-v13:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/support-v13/26.0.0/support-v13-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/support-v13/26.0.0/support-v13-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v13/26.0.0/support-v13-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v13/26.0.0/support-v13-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v13/26.0.0/support-v13-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v13/26.0.0/support-v13-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/support-v13/26.0.0/support-v13-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/support-v13/26.0.0/support-v13-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/support-v13/26.0.0/support-v13-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/support-v13/26.0.0/support-v13-26.0.0.jar
  Required by:
      project :app
> Could not find com.android.support:mediarouter-v7:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/mediarouter-v7/26.0.0/mediarouter-v7-26.0.0.jar
  Required by:
      project :app
> Could not find com.android.support:design:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/design/26.0.0/design-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/design/26.0.0/design-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/design/26.0.0/design-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/design/26.0.0/design-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/design/26.0.0/design-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/design/26.0.0/design-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/design/26.0.0/design-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/design/26.0.0/design-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/design/26.0.0/design-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/design/26.0.0/design-26.0.0.jar
  Required by:
      project :app
> Could not find com.android.support:support-v4:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
  Required by:
      project :app
> Could not find com.android.support:cardview-v7:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
  Required by:
      project :app
> Could not find com.android.support:recyclerview-v7:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/recyclerview-v7/26.0.0/recyclerview-v7-26.0.0.jar
  Required by:
      project :app
> Could not find com.android.support:appcompat-v7:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
  Required by:
      project :app
> Could not find com.android.support:support-v4:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
  Required by:
      project :app > com.facebook.android:facebook-android-sdk:4.25.0
> Could not find com.android.support:appcompat-v7:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/appcompat-v7/26.0.0/appcompat-v7-26.0.0.jar
  Required by:
      project :app > com.facebook.android:facebook-android-sdk:4.25.0
> Could not find com.android.support:cardview-v7:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/cardview-v7/26.0.0/cardview-v7-26.0.0.jar
  Required by:
      project :app > com.facebook.android:facebook-android-sdk:4.25.0
> Could not find com.android.support:support-v4:26.0.0.
  Searched in the following locations:
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Users/bcalabro/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      file:/Applications/Android Studio 3.0 Preview.app/Contents/gradle/m2repository/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
      https://jcenter.bintray.com/com/android/support/support-v4/26.0.0/support-v4-26.0.0.pom
      https://jcenter.bintray.com/com/android/support/support-v4/26.0.0/support-v4-26.0.0.jar
  Required by:
      project :app > com.google.android.gms:play-services-analytics:11.0.4 > com.google.android.gms:play-services-basement:11.0.4
like image 338
Brandon Avatar asked Aug 03 '17 14:08

Brandon


1 Answers

Writing:

repositories {
    google()
}

didn't worked in my case, so I used:

repositories {
    maven {
        url 'https://maven.google.com'
    }
}

and it worked!

checkout the migration guide for more info!

like image 71
Sarthak Mittal Avatar answered Nov 15 '22 16:11

Sarthak Mittal