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

前端 未结 8 1400
情话喂你
情话喂你 2021-02-01 13:18

My Android Studio is full of error android studio cannot identify libraries.

Error:(27, 13) Failed to resolve: com.android.support:appcompat-v7:25.1.0


        
相关标签:
8条回答
  • 2021-02-01 13:36

    I had some problems as you say in recently. And I resolve these problem as follow:

    Step 1. Create a new android project in AndroidStudio , and it can run normally.

    Step 2. Please make sure your project can run normally, and see the build.gradle file, then find the version code in build.gradle file. And my build.gradle file like as follow:

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 23
        buildToolsVersion 24.0.1
    }
    ...
    ...
    dependencies {
        // App's dependencies, including test
        compile "com.android.support:appcompat-v7:23.4.0"
        compile "com.android.support:cardview-v7:23.4.0"
    }
    

    And the correct version 23.4.0 is what you want.

    If you can not solve the problem, you can change compileSdkVersion and buildToolsVersion.

    Step 3. Config the correct version in your build.gradle file and sync project.

    0 讨论(0)
  • 2021-02-01 13:41

    add below code in your Project level gradle in allprojects{}

     maven {
            url "https://maven.google.com"
        }
    
    0 讨论(0)
提交回复
热议问题