如何解决这个问题?

时间:2019-04-24 16:17:12

标签: android

错误:无法解析com.android.supprt:appcompat-v7:28.0.1

应用插件:“ com.android.application”

android {

compileSdkVersion 23

buildToolsVersion "28.0.1"

defaultConfig {

    applicationId "com.example.dell.swipelistview"

    minSdkVersion 23

    targetSdkVersion 23

    versionCode 1

    versionName "1.0"
}

buildTypes {

    release {

        minifyEnabled false

        proguardFiles getDefaultProguardFile('proguard-android.txt'), 

'proguard-rules.pro'

    }

}

}

依赖性{

compile fileTree(dir: 'libs', include: ['*.jar'])

testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:23.4.0'

}

2 个答案:

答案 0 :(得分:0)

您必须在build.gradle(项目)中添加Maven存储库

allprojects {
    repositories {
    ...
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    ...
    }
}

答案 1 :(得分:0)

您必须从sdk Manager下载28.0.1构建工具版本,或者您处于离线模式。或使用它:

allprojects {     储存库{         .......         谷歌()         .......     } }