当我在android studio中创建地图谷歌地图活动时...创建后需要时间来同步gradle ...然后它会显示以下错误....
Error:A problem occurred configuring project ':app'.
无法解析配置':app:_debugCompile'的所有依赖项。 找不到com.android.support:support-v4:22.2.0。 在以下位置搜索: hhttps://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom hhttps://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar 要求: MrCabv1:app:未指定> com.android.support:appcompat-v7:22.1.0 找不到com.android.support:support-v4:22.2.0。 在以下位置搜索: hhttps://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom hhttps://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom 文件:/ C:/Users/MABC/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/support-v4/22.2.0/support-v4-22.2.0.aar 要求: MrCabv1:app:未指定> com.google.android.gms:play-services:8.3.0> com.google.android.gms:播放服务地下室:8.3.0 找不到com.android.support:mediarouter-v7:22.2.0。 在以下位置搜索: https://jcenter.bintray.com/com/android/support/mediarouter-v7/22.2.0/mediarouter-v7-22.2.0.pom https://jcenter.bintray.com/com/android/support/mediarouter-v7/22.2.0/mediarouter-v7-22.2.0.aar 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/mediarouter-v7/22.2.0/mediarouter-v7-22.2.0.pom 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/mediarouter-v7/22.2.0/mediarouter-v7-22.2.0.aar 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/mediarouter-v7/22.2.0/mediarouter-v7-22.2.0.pom 文件:/ C:/Users/ABC/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/mediarouter-v7/22.2.0/mediarouter-v7-22.2.0.aar 要求: MrCabv1:app:未指定> com.google.android.gms:play-services:8.3.0> com.google.android.gms:播放服务铸:8.3.0
答案 0 :(得分:0)
嗯,这意味着您没有为
分配任何或错误的依赖项com.android.support:support-v4:22.2.0
和
com.android.support:mediarouter-v7:22.2.0
解。转到Gradle脚本 - > build.gradle(模块:app) - >依赖关系并根据API需求(您的SDK API)将正确的版本添加到build.gradle。 确保它是正确的,即compileSDKVersion 23和buildToolsVersion“23.0.2”所以你需要
compile 'com.android.support:mediarouter-v7:23.1.1'
参考failed to resolve com.android.support:appcompat-v7:22 and com.android.support:recyclerview-v7:21.1.2
http://developer.android.com/reference/android/support/v7/media/MediaRouter.html