Failed to resolve:

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


in build.gradle as follows:

allprojects {
    repositories {
        maven{url ""}

add maven{url “”} and then synchronize the project to resolve the error.

Read More: