首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到com.android.support:support-v4:21.0.2

找不到com.android.support:support-v4:21.0.2
EN

Stack Overflow用户
提问于 2014-12-03 18:40:49
回答 3查看 6.6K关注 0票数 3

我正在使用Android Studio v0.8.6

我有一个使用Androidgoogle-play-service应用程序,当我试图构建:

代码语言:javascript
复制
Executing tasks: [clean, :libraries:BaseGameUtils:generateDebugSources, :app:generateDebugSources]

Configuration on demand is an incubating feature.
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not find com.android.support:support-v4:21.0.2.
     Required by:
         RIGHTER-android:app:unspecified
         RIGHTER-android:app:unspecified > com.google.android.gms:play-services:6.1.11
         RIGHTER-android:app:unspecified > RIGHTER-android.libraries:BaseGameUtils:unspecified > com.android.support:appcompat-v7:20.0.0
   > Could not find com.android.support:support-v4:21.0.2.
     Required by:
         RIGHTER-android:app:unspecified > RIGHTER-android.libraries:BaseGameUtils:unspecified
   > Could not find com.android.support:support-v4:21.0.2.
     Required by:
         RIGHTER-android:app:unspecified > com.github.filippudak.progresspieview:library:1.0.4

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.405 secs

这个错误是最近发生的,我没有更新任何东西。

任何帮助都将不胜感激,谢谢提前!

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2014-12-03 19:41:38

不要忘记偶尔更新Android SDK Manager :-}

票数 1
EN

Stack Overflow用户

发布于 2014-12-03 19:48:11

我可以理解我的评论:“如果安装了21.0.2,可以在中签入吗?”帮了你。

但问题的核心是。我认为,问题的核心是build.gradle中的依赖关系部分。我坚信,在以下方面:

代码语言:javascript
复制
compile 'com.google.android.gms:play-services:x.y.z'

你在某个地方有'+',这意味着,你使用的库的那个版本没有设置过一次,并且可以改变,这发生在Google服务库中。

始终尝试将库的完整版本号,以避免这类问题的功能。

票数 0
EN

Stack Overflow用户

发布于 2015-03-15 13:11:38

只需打开Android管理器并安装Android支持库和即可。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27279231

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档