更新到23.3.0后,Android支持库错误 [英] Android support library error after updating to 23.3.0

查看:76
本文介绍了更新到23.3.0后,Android支持库错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用android支持v4 23.1.1,最近尝试将其更新为23.3.0(在询问时为最新版本),但出现以下错误:

I have been using android support v4 23.1.1 and recently tried to update it to 23.3.0 ( the latest one when this was asked) but I got the following error:

错误:与依赖项'com.android.support:support-annotations'冲突.
应用(23.3.0)和测试应用(23.1.1)的已解决版本不同.
参见 http://g.co/androidstudio/app-test-app-conflict了解详情.

Error:Conflict with dependency 'com.android.support:support-annotations'.
Resolved versions for app (23.3.0) and test app (23.1.1) differ.
See http://g.co/androidstudio/app-test-app-conflict for details.

到目前为止,我已经找到了这个 https://code.google. com/p/android/issues/detail?id = 206137

So far I have found this https://code.google.com/p/android/issues/detail?id=206137

我访问了两个链接,但无法解决我的问题,如何解决此问题?

I went to both the links but I could not fix my issue, how do I fix this issue?

我的依赖项中有这些

compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.android.support:design:23.3.0'

以前所有版本均为23.1.1,并且工作正常,更新后出现错误

Previously all the versions were 23.1.1 and it worked fine the error occurred after updating

Gradle Version 2.10
Gradle Plugin Version 2.0.0
buildToolsVersion "23.0.3"

推荐答案

对于仍然面临此问题的人们,只需将此行添加到您的依赖项中即可.

For those people who are still facing this problem just add this line to your dependencies.

androidTestCompile 'com.android.support:support-annotations:23.3.0'

它解决了我的问题.

更新:

如果您现在遇到此错误,则只需将新版本代码(在这种情况下为23.3.0或18年5月的27.1.1)插入上述解决方案中的错误中即可.

If you have this error nowadays, you can just insert the new versioncode (23.3.0 in this case, or 27.1.1 in May '18) as it is described in the error into the above described solution.

这篇关于更新到23.3.0后,Android支持库错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆