gpt4 book ai didi

java - 多个dex文件定义Landroid/arch/lifecycle/LiveData$LifecycleBoundObserver;

转载 作者:行者123 更新时间:2023-11-29 19:00:27 26 4
gpt4 key购买 nike

运行应用程序时显示错误

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

构建.gradle

dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
compile('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.6.2') {
transitive = true
}
compile 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.6.2'
compile 'com.google.firebase:firebase-auth:11.6.0'
compile 'com.google.firebase:firebase-messaging:11.6.0'
compile 'com.google.firebase:firebase-messaging:11.6.0'
compile 'com.paypal.sdk:paypal-android-sdk:2.15.3'
compile 'com.github.TheBrownArrow:PermissionManager:1.0.0'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'gun0912.ted:tedbottompicker:1.0.12'
compile 'com.akexorcist:googledirectionlibrary:1.0.5'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'com.google.android.gms:play-services-places:11.6.0'
compile 'com.google.android.gms:play-services-base:11.6.0'
compile 'com.google.firebase:firebase-database:11.6.0'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.android.support:multidex:1.0.1'
compile 'me.anwarshahriar:calligrapher:1.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.android.support:cardview-v7:23.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'uk.co.chrisjenx:calligraphy:2.3.0'
compile 'com.seatgeek:placesautocomplete:0.3-SNAPSHOT'
compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
compile 'com.android.support:design:24.0.0'
compile 'com.onesignal:OneSignal:[3.7.1, 3.99.99]'

compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
implementation 'com.android.support:cardview-v7:27.0.0'
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support:design:27.0.0'
}

最佳答案

您需要为所有支持依赖项使用相同的版本,并且不要添加重复的依赖项。您需要对依赖项进行分组以使其更易于管理。你的依赖应该是这样的:

dependencies {

// Support library
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'

// Firebase and Play service library
implementation 'com.google.firebase:firebase-auth:11.6.0'
implementation 'com.google.firebase:firebase-messaging:11.6.0'
implementation 'com.google.android.gms:play-services-maps:11.6.0'
implementation 'com.google.android.gms:play-services-location:11.6.0'
implementation 'com.google.android.gms:play-services-places:11.6.0'
implementation 'com.google.firebase:firebase-database:11.6.0'

implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.6.2'

implementation 'com.paypal.sdk:paypal-android-sdk:2.15.3'
implementation 'com.github.TheBrownArrow:PermissionManager:1.0.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'gun0912.ted:tedbottompicker:1.0.12'
implementation 'com.akexorcist:googledirectionlibrary:1.0.5'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.android.support:multidex:1.0.1'
implementation 'me.anwarshahriar:calligrapher:1.0'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.seatgeek:placesautocomplete:0.3-SNAPSHOT'
implementation 'com.weiwangcn.betterspinner:library-material:1.1.0'
implementation 'com.onesignal:OneSignal:[3.7.1, 3.99.99]'

implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
}

关于java - 多个dex文件定义Landroid/arch/lifecycle/LiveData$LifecycleBoundObserver;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49203401/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com