我不知道appcompat:design:1.1.0的错误在哪里

时间:2020-01-21 18:17:10

标签: java android android-support-library material-components-android

appcompat:design:1.1.0

我不知道哪里出了错。可能在appcompat:design:1.1.0,但是我知道我做错了什么。我是新来的:)

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 15
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}


dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.appcompat:design:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.firebase:firebase-auth:19.2.0'
    implementation 'com.google.firebase:firebase-database:19.2.0'
    implementation 'com.google.firebase:firebase-storage:19.1.0'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

1 个答案:

答案 0 :(得分:2)

androidx.appcompat:design 不存在

删除此依赖项:

implementation 'androidx.appcompat:design:1.1.0'

并添加Material Components Library

Android的材料组件是Android的设计支持库的直接替代。

添加这些依赖项之一:

implementation 'com.google.android.material:material:1.0.0' //stable release
implementation 'com.google.android.material:material:1.1.0' //stable release
implementation 'com.google.android.material:material:1.2.0-alpha03' //alpha release