【发布时间】:2014-12-26 19:39:14
【问题描述】:
我知道here 之前有人问过这个问题,但这是 android studio 抱怨的:
我确定我没有在 gradle 构建中的任何地方引用支持库,但 android studio 抱怨说 google play 服务需要它。
编辑:
dependencies {
compile project(':comgizmogadgetsappzproductivity')
compile 'com.google.android.gms:play-services-ads:+'
compile files('libs/Parse-1.3.8.jar')
compile files('libs/crashlytics.jar')
}
comgizmogadgetsappzproductivity 没有依赖关系。
编辑 2:
问题是我之前将支持库作为依赖项,但我删除了它,因为我不再需要它了。从构建错误中我可以看到它说“configuration:app:_debugCompile”需要它。也许我需要从 _debugCompile 配置中手动删除支持库? “_debugCompile”是一个文件吗?我尝试在项目文件夹中使用 find 和 grep 搜索它,但没有找到任何东西。
【问题讨论】:
-
我将此作为评论添加,因为我想留出空间让某人回答更多细节,但显然这是必要的。
-
奇怪...我刚刚重新检查并且它工作(很好,编译):) 很好,没有添加支持库。这是您项目中的唯一依赖项吗?
-
不,我有更多,但没有人需要支持库。但正如您在屏幕截图中看到的那样,它显示“需要:应用名称:未指定(这是什么意思?)> play-services-ads”
-
确保您已通过 SDK 管理器下载了支持库存储库和 Google Play 服务存储库。好像没有安装支持库。
-
@Maria 你能列出你的其他依赖吗?
标签: android admob google-play-services android-support-library