【问题标题】:Implementation 'com.android.support:design:29.0.3' in new version在新版本中实现 'com.android.support:design:29.0.3'
【发布时间】:2020-08-11 10:15:31
【问题描述】:

我在看这个教程:https://www.youtube.com/watch?v=fGcMLu1GJEc&t=4s,作者说要改appcompat为design enter image description here 但是,我的代码中没有这样的字符串:enter image description here 即使我的代码中没有这些字符串,我应该怎么做才能使它正确? 我的意思是,如果我没有'''implement com.android.support:appcompat''',我该怎么办,但我有'''implementation 'androidx.appcompat:appcompat:1.1.0'''' ?

【问题讨论】:

  • 最好在示例中包含文本而不是屏幕截图。更好的是,如果它不是超级大,一个完整的例子。
  • 你必须先将所有依赖项添加到你的 build.gradle

标签: java android-studio build.gradle


【解决方案1】:

为您的应用打开 build.gradle 文件。

确保存储库部分包含 Google 的 Maven 存储库 google()。例如:

allprojects {
    repositories {
      google()
      jcenter()
    }
  }

将库添加到依赖项部分:

用这个替换设计依赖。

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

【讨论】:

    猜你喜欢
    • 2020-09-29
    • 2020-01-10
    • 2020-08-07
    • 2018-04-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-04
    • 1970-01-01
    相关资源
    最近更新 更多