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

problem scenario:

after the Android Studio version upgrade, the normal project before Build failed (the project compiled normally with version 2.2.3 failed to compile with version 4.0.1 Studio).

error as follows:

Failed to resolve: Com. Android. Support: appcompat – v7:25.3.0
Add Google Maven repository and sync project
Show in the project Structure dialog
Affected Modules: app

add Google maven repository

as prompted

click on Add Google Maven repository and sync project, then open the project build.gradle file

Add

in build.gradle as follows:

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

add maven{url “https://maven.google.com”} and then synchronize the project to resolve the error.

Read More: