Reputation: 676
I have the followings in my dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.github.satyan:sugar:1.3.1'
compile 'com.android.support:support-v13:+'
}
and the project gets compiled very well, but when I add the following:
compile 'com.mohamadamin:persianmaterialdatetimepicker:1.2.1'
I get this error message:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:support-v4:22.2.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/22.2.1/support-v4-22.2.1.pom
https://jcenter.bintray.com/com/android/support/support-v4/22.2.1/support-v4-22.2.1.jar
file:/C:/Users/Navarch/AppData/Local/Android/sdk1/extras/android/m2repository/com/android/support/support-v4/22.2.1/support-v4-22.2.1.pom
file:/C:/Users/Navarch/AppData/Local/Android/sdk1/extras/android/m2repository/com/android/support/support-v4/22.2.1/support-v4-22.2.1.jar
file:/C:/Users/Navarch/AppData/Local/Android/sdk1/extras/google/m2repository/com/android/support/support-v4/22.2.1/support-v4-22.2.1.pom
file:/C:/Users/Navarch/AppData/Local/Android/sdk1/extras/google/m2repository/com/android/support/support-v4/22.2.1/support-v4-22.2.1.jar
Required by:
MyApp:app:unspecified > com.android.support:appcompat-v7:22.1.1
MyApp:app:unspecified > com.android.support:support-v13:22.1.1
> Could not find com.android.support:support-v4:22.2.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/22.2.1/support-v4-22.2.1.pom
https://jcenter.bintray.com/com/android/support/support-v4/22.2.1/support-v4-22.2.1.jar
file:/C:/Users/Navarch/AppData/Local/Android/sdk1/extras/android/m2repository/com/android/support/support-v4/22.2.1/support-v4-22.2.1.pom
file:/C:/Users/Navarch/AppData/Local/Android/sdk1/extras/android/m2repository/com/android/support/support-v4/22.2.1/support-v4-22.2.1.jar
file:/C:/Users/Navarch/AppData/Local/Android/sdk1/extras/google/m2repository/com/android/support/support-v4/22.2.1/support-v4-22.2.1.pom
file:/C:/Users/Navarch/AppData/Local/Android/sdk1/extras/google/m2repository/com/android/support/support-v4/22.2.1/support-v4-22.2.1.jar
Required by:
MyApp:app:unspecified > com.mohamadamin:persianmaterialdatetimepicker:1.2.1
I searched a lot but nothing seems to work for my case. How can I solve the issue?
Upvotes: 0
Views: 4624
Reputation: 1006944
If you have appcompat-v7:22.1.1
, that means that you should have support-v4:22.1.1
. The library you are trying to use is requesting support-v4:22.2.1
, which is newer.
Make sure that your Android Repository is up to date in the SDK Manager. Usually, having older artifacts but not newer ones means that you have not updated the Android Repository recently.
Upvotes: 4