gpt4 book ai didi

android - 无法解析配置 ':app:_debugCompile' 的所有依赖项

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:01:06 24 4
gpt4 key购买 nike

我正在尝试在我的 Android 应用程序上使用 Google map 。我安装了 Google Play 服务并获得了 API key 。我不明白为什么会收到此错误消息!我认为它提示以下内容。

    <meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

错误信息:

  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.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/22.0.0/support-v4-22.0.0.pom
https://jcenter.bintray.com/com/android/support/support-v4/22.0.0/support-v4-22.0.0.aar
file:/C:/Users/Ammar/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/22.0.0/support-v4-22.0.0.pom
file:/C:/Users/Ammar/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/22.0.0/support-v4-22.0.0.aar
file:/C:/Users/Ammar/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/support-v4/22.0.0/support-v4-22.0.0.pom
file:/C:/Users/Ammar/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/support-v4/22.0.0/support-v4-22.0.0.aar
Required by:
Client:app:unspecified > com.android.support:appcompat-v7:21.0.3
> Could not find com.android.support:support-v4:22.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/22.0.0/support-v4-22.0.0.pom
https://jcenter.bintray.com/com/android/support/support-v4/22.0.0/support-v4-22.0.0.aar
file:/C:/Users/Ammar/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/22.0.0/support-v4-22.0.0.pom
file:/C:/Users/Ammar/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/22.0.0/support-v4-22.0.0.aar
file:/C:/Users/Ammar/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/support-v4/22.0.0/support-v4-22.0.0.pom
file:/C:/Users/Ammar/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/support-v4/22.0.0/support-v4-22.0.0.aar
Required by:
Client:app:unspecified > com.google.android.gms:play-services:7.0.0 > com.google.android.gms:play-services-base:7.0.0

最佳答案

显然它正在寻找 v4 (com.android.support:support-v4) jar。你的构建路径中有它吗?

对于 android studio,在 dependencies block 中的 gradle 文件中,添加以下行 -

dependencies {
compile 'com.android.support:support-v4:22.0.+'
// your other dependencies as well

}

并确保您已经通过 SDK 管理器下载了 Android 支持库。如果您还没有,请引用官方文档 Support Library Setup

关于android - 无法解析配置 ':app:_debugCompile' 的所有依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29580487/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com