Failed to resolve: com.android.support:appcompat-v7:26.0.0

后端 未结 14 1573
旧时难觅i
旧时难觅i 2020-11-22 05:56

I am having this issue in Android studio.

Error:(22, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.0
Install         


        
相关标签:
14条回答
  • 2020-11-22 06:27

    change

    compile 'com.android.support:appcompat-v7:26.0'
    

    to

    `compile 'com.android.support:appcompat-v7:26.+'`
    

    worked for me fine.

    0 讨论(0)
  • 2020-11-22 06:28

    1 - in build.gradle change my supportLibVersion to 26.0.0

    2 - in app/build.gradle use :

    implementation "com.android.support:appcompat v7:${rootProject.ext.supportLibVersion}"

    3 - cd android

    4 - ./gradlew clean

    5 - ./gradlew assembleRelease

    0 讨论(0)
  • 2020-11-22 06:32

    If you already use jitpack.io or any repository. You can add google repository like this:

    allprojects {
        repositories {
            maven { url "https://jitpack.io" }
            maven { url "https://maven.google.com" }
        }
    }
    
    0 讨论(0)
  • 2020-11-22 06:32

    Adding the below content in the main gradle has solved the problem for me:

    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
            flatDir {
                dirs 'libs'
            }
        }
    
    0 讨论(0)
  • 2020-11-22 06:37

    My issue got resolved with the help of following steps:

    For gradle 3.0.0 and above version

    1. add google() below jcenter()
    2. Change the compileSdkVersion to 26 and buildToolsVersion to 26.0.2
    3. Change to gradle-4.2.1-all.zip in the gradle_wrapper.properties file
    0 讨论(0)
  • 2020-11-22 06:41
    1. Add this in build.gradle(Project:projectname)

      allprojects {
        repositories {
          jcenter()
          maven { url "https://maven.google.com" }
        }
      }
      
    2. Add this in build.gradle(Module:app)

      dependencies {
        compile 'com.android.support:appcompat-v7:26.1.0'
      }
      
    0 讨论(0)
提交回复
热议问题