我试图在我的 xml 文件中使用 Coordinator Layout,但发现它对应的库不存在。
所以我尝试将其包含在我的 gradle 构建文件中
implementation 'com.android.support:design:28.0.0'
但是报错
Supplied String module notation 'androidx.' is invalid. Example notations: > 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.
然后我发现所有支持库都已弃用,需要使用 androidx 库。
How to include this library in my gradle file ?
***My main intention is to use Coordinator Layout in my UI
最佳答案
点击android studio菜单栏上的“Refactor”。 选择“迁移到 Androidx...”
工作完成。
关于android - 无法在构建 gradle 文件中实现支持设计库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58555064/