I want to integrate AdMob into my app. If I add the following line in the dependencies
compile 'com.google.android.gms:play-services-ads:8.3.0'
then I get the following error:
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.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
Required by:
AncientGame:app:unspecified com.android.support:appcompat-v7:22.0.0
AncientGame:app:unspecified com.google.android.gms:play-services:7.5.0 com.google.android.gms:play-services-base:7.5.0
Could not find com.android.support:support-v4:22.2.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
Required by:
AncientGame:app:unspecified AncientGame:BaseGameUtils:unspecified
Could not find com.android.support:support-v4:22.2.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom
file:/C:/Users/narayan/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar
Required by:
AncientGame:app:unspecified com.google.android.gms:play-services-ads:8.3.0 com.google.android.gms:play-services-basement:8.3.0
How can I solve this. Please help me!!
You receive that error because your Android Support Repository
is not updated.
To resolve the issue:
Extras > Android Support Repository
Install packages...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.