我正在使用Android Studio v0.8.6
我有一个使用Android的google-play-service应用程序,当我试图构建:
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这个错误是最近发生的,我没有更新任何东西。
任何帮助都将不胜感激,谢谢提前!
发布于 2014-12-03 19:41:38
不要忘记偶尔更新Android SDK Manager :-}
发布于 2014-12-03 19:48:11
我可以理解我的评论:“如果安装了21.0.2,可以在中签入吗?”帮了你。
但问题的核心是。我认为,问题的核心是build.gradle中的依赖关系部分。我坚信,在以下方面:
compile 'com.google.android.gms:play-services:x.y.z'你在某个地方有'+',这意味着,你使用的库的那个版本没有设置过一次,并且可以改变,这发生在Google服务库中。
始终尝试将库的完整版本号,以避免这类问题的功能。
发布于 2015-03-15 13:11:38
只需打开Android管理器并安装Android支持库和即可。
https://stackoverflow.com/questions/27279231
复制相似问题