【发布时间】:2019-06-09 07:14:47
【问题描述】:
当我更新到最新的 API 28 时,问题就开始了。我了解到 com.* 的依赖项已移至 androidx。我尝试了不同的方法来解决这个问题,但我仍然没有设法让它编译。
我的依赖结构
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.google.firebase:firebase-core:16.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
问题是每次我尝试构建它时,错误都会发生变化。有时是
Android 依赖 'androidx.slidingpanelayout:slidingpanelayout' 有 编译(1.0.0-rc01)和运行时(1.0.0)的不同版本 类路径。 -- 我的依赖结构中没有这样的库。
others.. 与 Dex 冲突的东西,所以我尝试在 build.grandle 和
中设置 multiDexEnabled trueandroid.useAndroidX=true
android.enableJetifier=true at grandle.properties
我也尝试升级和降级 compileSdkVersion...
previous
compileSdkVersion 27
minSdkVersion 16
targetSdkVersion 27
current
compileSdkVersion 28
minSdkVersion 21
targetSdkVersion 28
此外,我看到了 google 的迁移教程。尽管如此,通过使用 Flutter,我的结构中没有任何这些库(至少我没有将这些库中的任何一个放在依赖项中——也许它们是在编译时在猎犬下获取的)。
这几天让我发疯了。
任何见解都会非常有帮助。提前致谢。
【问题讨论】:
标签: flutter flutter-dependencies