最佳答案
我知道,androidx 和支持依赖性会导致 multidex 错误 我们不能同时使用 android 和 android 支持。所以我完全转移到安卓系统。但是我的一个依赖库使用了 android 支持“ lottie”。
在上面的情况下我们可以做什么? 我应该从我的项目中删除“乐蒂”。
下面是我的等级
defaultConfig {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
ext{
lottieVersion = "2.5.4"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
def androidx = "1.0.0-rc01"
api "androidx.constraintlayout:constraintlayout:1.1.2"
api "androidx.appcompat:appcompat:$androidx"
api "androidx.recyclerview:recyclerview:$androidx"
api "androidx.cardview:cardview:$androidx"
api "androidx.core:core-ktx:$androidx"
api "com.google.android.material:material:1.0.0-rc01"
implementation "com.google.code.gson:gson:2.8.5"
implementation "androidx.multidex:multidex:2.0.0"
implementation "com.airbnb.android:lottie:$lottieVersion"
}