【问题标题】:I don't know where is my mistake at the appcompat:design:1.1.0我不知道我在 appcompat:design:1.1.0 的错误在哪里
【发布时间】:2020-01-21 18:17:10
【问题描述】:

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'
}

【问题讨论】:

  • 能否分享一下错误日志?
  • 移除 androidx.appcompat:design
  • 找不到 androidx.appcompat:design:1.1.0。要求:project :app 在 build.gradle 文件中搜索 @Dhruv
  • 如果你想使用 androidx 的设计支持库,请使用 implementation 'com.google.android.material:material:1.0.0'
  • 其实这就是答案。谢谢人

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


【解决方案1】:

androidx.appcompat:design不存在

移除这个依赖:

implementation 'androidx.appcompat:design:1.1.0'

并添加Material Components Library

Material Components for 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

【讨论】:

    猜你喜欢
    • 2023-03-30
    • 2015-07-13
    • 2012-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-20
    相关资源
    最近更新 更多