欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

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

程序员文章站 2023-12-23 23:54:03
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/c ......

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没毛病。

 

上一篇:

下一篇: