我在我的应用程序中使用 DrawerLayout
和 Hamburger 菜单。我将我的应用程序迁移到 Androidx
。除了 DrawerLayout
之外,一切看起来都是正确的。它不知道 DrawerLayout
类。
我必须做什么?
最佳答案
AndroidX 有 its implementation of DrawerLayout
.
将 implementation "androidx.drawerlayout:drawerlayout:1.0.0"
添加到模块的依赖项中(您可以检查 Google's Maven repository catalog 以确认可用版本)。
关于java - AndroidX 中的 DrawerLayout 丢失了吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54865710/