Android studio 3.0 Unable to resolve dependency for

興建的工程 就出現(xiàn)這個錯誤

出現(xiàn)的異常

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support.constraint:constraint-layout:1.1.1.
Open File
Show Details

Google 了一把 各種回答

解決方案

看錯誤的信息

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support.constraint:constraint-layout:1.1.1.

我的理解 不能加載1.1.1 版本的 那么 就改成

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.allens.test"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
 //   implementation 'com.android.support.constraint:constraint-layout:1.1.1'
//替換陳這個版本的
   implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:support-v4:27.1.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}

build

ok

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 相信很多人都收到了Android studio 3.0穩(wěn)定版的升級提醒 回想一下,2.3的就可以編譯通過,3.0的...
    諸星団閱讀 3,006評論 0 0
  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 179,023評論 25 709
  • 愿時光不曾老去,一切都還是當(dāng)初的模樣。驀然秋雨的時節(jié),悄悄離去,也抓不住它的尾巴。那水上的樓榭,無復(fù)當(dāng)初的繁華,已...
    巴圖魯閱讀 288評論 0 3
  • 2017.12.29(312~焦點原創(chuàng)分享172) 當(dāng)大事兒小事兒,公事私事兒,一件件擺在面前的時候。的確給...
    方正省閱讀 313評論 0 1
  • 時間越來越快,歲數(shù)越來越大,真的是應(yīng)了小時候媽媽說的那句,等你長大了你就想小時候了。當(dāng)時我在想怎么可能,大了想吃什...
    一個好瘦的胖子閱讀 197評論 0 0

友情鏈接更多精彩內(nèi)容