android - android design library 28.0.0 causes app to crash
问题描述
Including android design library to the dependencies causes app to crash.
Im launching this on Nexus S emulator with 25 API. All my libraries are of the same version, so I don't know what's the problem.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0' //this one
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:28.0.0' // For CardView
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
解决方案
将您的代码迁移到 AndroidX,新的 SDK 依赖目录结构将帮助您在现在和将来避免此类问题。
推荐阅读
- kotlin - 在中心旋转等边三角形
- c++ - 最大公用除法器程序未按预期工作
- mysql - Lua 无效向量字段 - Mysql 行的 For 循环
- python-3.x - Python 3.8 将“open”视为导入的 openpyxl 方法而不是内置函数
- javascript - 尝试在javascript中为数据网格构建多维数组
- javascript - 引导表单验证 - 检查该字段是否为空,并且包含有效的 URL
- python - UnboundLocalError:未定义局部变量“开始”
- ios - Xcode 单元测试导航
- c# - ASP .net 表单——Rider
- javascript - 如果没有用户给定的值 React 如何提交 defaultValue