我在Build面板中遇到此错误:
* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Program type already present: com.parse.AbstractQueryController$1
将这个库实现'com.parse:parse-livequery-android:1.0.6'添加到我现有的实现后,他们是这些:
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'com.google.android.gms:play-services:11.4.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
//image_view_cornered_lib
implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'
//circle image view lib
implementation 'de.hdodenhof:circleimageview:2.2.0'
//parse libs here
implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.19.0'
implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.19.0'
implementation 'com.github.parse-community.Parse-SDK-Android:ktx:1.19.0'
你试过这个:
在app / build.gradle中:
android {
defaultConfig {
multiDexEnabled true
}
}
com.parse.AbstractQueryController
模块由多个库使用
在你的情况下,它必须是com.parse:parse-livequery-android:1.0.6
和com.github.parse-community.Parse-SDK-Android:parse:1.19.0
要查找模块应用程序的依赖项列表(应用程序的默认模块名称),我们可以执行此操作
gradlew app:依赖项
检索所有库的列表。
在您发现使用两次不同版本的模块后,将其排除在外
implementation ('com.parse:parse-livequery-android:1.0.6') {
exclude module: 'duplicated module'
}