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
As the latest version of the support library according to the support library changelog 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"
I had similar issue tonight after I upgraded Android SDK Tools. I went to the app/build.gradle file. Down to the dependencies section. Two of my dependencies were highlighted stating I should upgrade to a newer version. I updated to version suggested and the error went away. For my situation I used 24.2.1 of the libraries that caused the error.
I had similar problem. after change compileSdkVersion
to 24 , update android support repository and change appcompat version, the problem solved.
compile "com.android.support:appcompat-v7:24.2.1"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With