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

前端 未结 8 1398
情话喂你
情话喂你 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:18

    There is a problem with latest libraries to be automatically installed by clicking

    Install Repository and sync project

    Go to SDK Manager and install your missing or not up-to-date packages from below tab:

    After you select desired library, click Apply and wait for installation to complete.

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

    click the link

    "Install Repository and sync project"

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

    Firstly, you will go (your_folder_app)\app\app.iml, which open your notepad software. After you will find: and you change to 27 with your version, for example for me, i change to 25.

    Secondly, you will change the build.gradle(Moudule:app) in your android studio. Red arrow show that you should to change.enter image description here. Example for me:enter image description here

    Finally, you will click "Try Again"

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

    Replace whatever build gradle version with this

    dependencies {
            classpath 'com.android.tools.build:gradle:3.1.3'
        }
    

    Then Click on

    Fix Gradle wrapper and re-import the project

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

    Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example:

    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
    }
    

    Update:

    allprojects {
        repositories {
            google()
    
            // If you're using a version of Gradle lower than 4.1, you must
            // instead use:
            //
            // maven {
            //     url 'https://maven.google.com'
            // }
        }
    }
    

    See android documention for details

    0 讨论(0)
  • 2021-02-01 13:29
    1. At first change your buildToolsVersion version 23.0.1 to 25.0.1
    2. Set compileSdkVersion 25

    Finally

    compileSdkVersion 25
    buildToolsVersion "25.0.1"
    

    Make sure you update your support repository . Then Clean-Rebuild-Run.

    0 讨论(0)
提交回复
热议问题