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

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

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

打開以前寫的安卓程序,運行,發現提示上述內容,非常奇怪,以前都好好的,爲啥忽然之間就變這樣了,啥都沒動啊,clean一下,再運行仍是這樣,只好求助谷歌了,谷歌獲得的答案也是至關出人意料,緣由是由於谷歌的問題。gradle

解決辦法:ui

就是在build.gradle裏面的dependencies中的這部份內容spa

 

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沒毛病。
相關文章
相關標籤/搜索