【问题标题】:What is the dependency of 'design' in androidx?androidx中“设计”的依赖是什么?
【发布时间】:2020-02-28 00:02:26
【问题描述】:

我使用的是导航抽屉,这没有错误

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'

但是在androidx中更新后

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:design:1.1.0'

此代码不适用于导航抽屉。

我的问题是这种情况下的依赖关系是什么。请帮忙。

【问题讨论】:

    标签: android android-support-library android-appcompat androidx material-components-android


    【解决方案1】:

    'androidx.appcompat:design:x.x.x'不存在
    使用Material Component Library:

    //Latest beta version
    implementation 'com.google.android.material:material:1.1.0-beta01'
    

    //Latest but old stable version
    implementation 'com.google.android.material:material:1.0.0'
    

    依赖实现'androidx.appcompat:appcompat:1.1.0'是正确的。

    【讨论】:

      【解决方案2】:

      使用这个

      implementation 'com.google.android.material:material:1.2.0-alpha01'
      

      【讨论】:

        猜你喜欢
        • 2021-08-29
        • 1970-01-01
        • 2018-04-10
        • 2019-03-02
        • 1970-01-01
        • 1970-01-01
        • 2020-03-11
        • 1970-01-01
        • 2016-06-24
        相关资源
        最近更新 更多