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 span>
Add Google Maven repository and sync project span>
Show in the project Structure dialog span>
Affected Modules: span> 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.