【问题标题】:android x design dependencyandroid x 设计依赖
【发布时间】:2019-12-28 09:10:35
【问题描述】:

如何导入androidx设计依赖

我已尝试导入:implementation 'androidx.design:design:1.0.2'

应用精简版为:implementation 'androidx.appcompat:appcompat:1.0.2'

我遇到了这个错误 -

错误:无法解决:androidx.design:design:1.0.2

【问题讨论】:

  • 使用implementation 'com.google.android.material:material:1.0.0'
  • 很好用!谢谢

标签: android dependencies androidx


【解决方案1】:

试试这个:

implementation 'com.google.android.material:material:1.0.0'

【讨论】:

    【解决方案2】:

    要从旧构建工件中了解新 Androidx 工件的等价物,请参考以下链接

    https://developer.android.com/jetpack/androidx/migrate/artifact-mappings

    注意:Poyyamozhi Ramakrishnan 的回答是正确的,我发布了我的回答以便更好地理解。

    【讨论】:

      【解决方案3】:

      androidx 中没有设计库。它使用材料库。获取更多信息 this

      【讨论】:

        【解决方案4】:

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

        只需将这个复制粘贴到您的依赖项中即可。

        【讨论】:

          【解决方案5】:

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

          试试这个最新的依赖。

          【讨论】:

            【解决方案6】:

            试试这个:'com.google.android.material:material-rc01'

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 2019-11-12
              • 1970-01-01
              • 1970-01-01
              • 2013-04-25
              • 2011-05-08
              • 2011-04-29
              • 1970-01-01
              • 1970-01-01
              相关资源
              最近更新 更多