温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Error:Could not find common.jar

发布时间:2020-08-07 11:13:03 来源:网络 阅读:1172 作者:591XT_XYZ 栏目:移动开发

Error:Could not find common.jar (android.arch.core:common:1.0.0).

Searched in the following locations: https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar

打开之前写的安卓程序,运行,发现提示上述内容,很是奇怪,之前都好好的,为啥突然之间就变这样了,啥都没动啊,clean一下,再运行还是这样,只好求助谷歌了,谷歌得到的答案也是相当出人意料,原因是因为谷歌的问题。

解决办法:

就是在build.gradle里面的dependencies中的这部分内容

compile 'com.hyphenate:hyphenate-sdk-lite:3.3.4'
compile 'com.umeng.analytics:analytics:latest.integration'
compile 'com.jakewharton:butterknife:8.8.1'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.+'

乍一看没啥问题的,之前的东西啥都没有动啊,当时我也是这样想的,不应该啊,之前的都没问题,其实是谷歌捣鬼了,以后这里面不能带+号,必须指定详细的版本才行,可能你会问 + 号在哪?看好了

compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'

就是这两个的原因,因为这是之前弄得,没问题,后来谷歌必须要求指定版本,不能带 + 号,也许你还会问把 + 号去掉我也不知道是哪个版本啊,很简单的,直接整成0就行了,

compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.android.support:design:26.0.0'

再次运行OK没毛病。 


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI