Qirui Qirui - 1 month ago 210
Android Question

Could not find com.android.support:appcompat-v7:24.2.0

Today I updated a new SDK, then my project caused a problem blow. I've already downloaded Android Support Repository, but it still didn't work.
Error:A problem occurred configuring project ':app'.


Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find com.android.support:appcompat-v7:24.2.0.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
https://jcenter.bintray.com/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
file:/C:/Users/Owner.KFW-39238/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
file:/C:/Users/Owner.KFW-39238/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
file:/C:/Users/Owner.KFW-39238/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
file:/C:/Users/Owner.KFW-39238/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
Required by:
Invoice:app:unspecified

Answer

As the latest version of the support library is v7:24.2.1 and not v7:24.2.0 modify your build.gradle to have v7:24.2.1:

compile "com.android.support:appcompat-v7:24.2.1"
Comments