【问题标题】:Not Able To Resolve com.google.android.gms:play-services-location:7.5.0 depends on libraries but is a jarNot Able To Resolve com.google.android.gms:play-services-location:7.5.0 依赖于库,但它是一个 jar
【发布时间】:2015-10-06 12:53:30
【问题描述】:

我在一个系统中创建了一个 Android 工作室项目,并在构建项目时导入到另一个系统中我不断收到此错误 我目前正在使用 android SDK 23 进行编译

错误:配置项目 ':app' 时出现问题。

找不到 play-services-location.jar (com.google.android.gms:play-services-location:7.5.0)。 在以下位置搜索: 文件:/home/Android/Sdk/extras/google/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar

到目前为止尝试过的事情 * 在模块级别添加依赖 * 将 SDK 降级到低版本直到 21 * 安装 Google Play 服务库

请推荐

更新 我也试过这个。错误:无法解决:com.google.android.gms:play-services-nearby:8.1.0 安装存储库并同步项目
打开文件
在项目结构对话框中显示 错误:错误:无法解决:com.google.android.gms:play-services-appindexing:8.1.0 安装存储库并同步项目
打开文件
在项目结构对话框中显示 错误:错误:无法解决:com.google.android.gms:play-services-games:8.1.0 安装存储库并同步项目
打开文件
在项目结构对话框中显示 当我单击安装存储库时,它告诉我错误: “忽略未知包过滤器'extra-google-m2repository'警告:包过滤器删除了所有包。没有要安装的东西。 请考虑在没有包过滤器的情况下再次尝试更新。”

【问题讨论】:

  • 在您的 SDK 管理器中安装 Google 存储库。

标签: android android-studio


【解决方案1】:

您需要在应用程序级别添加 gradle 文件,其中应包括您可以在应用程序中使用的所有 google play 服务。阅读以下 URL 中的信息,了解包括哪些服务(定位服务就是其中之一)。

apply plugin: 'com.android.application'
...

dependencies {
    compile 'com.google.android.gms:play-services:8.1.0'
}

https://developers.google.com/android/guides/setup

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-12
    • 1970-01-01
    • 2019-03-05
    相关资源
    最近更新 更多