【发布时间】:2019-09-15 19:58:31
【问题描述】:
我的依赖是:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
}
我有一个在 Android Pie 上运行良好的应用程序,它使用了较旧的支持库。但是,我决定将其迁移到 AndroidX 以支持最新版本。我没有更改任何逻辑代码,只是允许 Studio(3.5) 更改导入。现在,当我测试它时,它在 Pie 上崩溃(即使我将目标 sdk 和/或编译 sdk 更改为 28),并且在带有 Android 10 的模拟器上它工作正常。我错过了什么?
【问题讨论】:
标签: android android-studio migration androidx