android - 找不到 android.support.design.widget 类
问题描述
我在 Android Studio 中遇到了这个错误:
找不到以下类:
- android.support.design.widget.FloatingActionButton(修复构建路径,编辑 XML,创建类) - android.support.design.widget.TextInputLayout(修复构建路径,编辑 XML,创建类)
这是我的 build.gradle 文件的依赖项:
dependencies {
compile 'com.firebaseui:firebase-ui:0.6.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.firebase:firebase-database:18.0.0'
implementation 'com.android.support:design:27.1.1'
}
我已经尝试将com.android.support:design添加到 gradle 文件中,但它仍然不能解决我的问题
解决方案
试试这个:
com.google.android.material:material:1.0.0-rc01
反而
com.android.support:design
推荐阅读
- android - 如何找到图像中区域的平均颜色?
- html - 如何从数据库中获取最后 3 个创建的对象?
- powerbi-desktop - 在 PowerBI 桌面另存为菜单中看不到“SQL Server Reporting Services”
- python - Sympy 模块运行非常缓慢
- c# - 在单独的下拉列表中显示保存的值
- latex - Latex 中的签名页
- javascript - 如何让我的脚本读取下标输出作为预设变量名
- c++ - 将填充的地图插入模板 bst
- python - 如何在python中将dotx文件转换为html文件?
- javascript - env-cmd 错误未能在 gatsby 中找到 ./.env 文件?