Unable to execute dex: Multiple dex files define Lbolts/AggregateException

前端 未结 4 1291
故里飘歌
故里飘歌 2020-12-14 02:32

I do know Multiple dex problems have been reported a lot of times before, but none of the solutions seems to work in my case.

Console:

    Unable to          


        
相关标签:
4条回答
  • 2020-12-14 03:21

    RESOLVED

    bolts-android library was the real trouble here. There were two different versions of it causing a conflict. The FacebookSDK library brings bolts-android-1.1.2, and android-support-v7-appcompat brings bolts-android-1.1.4.

    I unmarked Android Private Libraries container in the FacebookSDKlibrary project, which contained bolts-android-1.1.2. As a result, my project now had only one version, bolts-android-1.1.4, settling the conflict. It runs fine now.

    Also, turns out, the duplicate android-support-v7-appcompat entries were not an issue.

    0 讨论(0)
  • 2020-12-14 03:26

    This can happen when adding facebook SDK to Android, you can solve it with:

    compile ("com.facebook.android:facebook-android-sdk:4.1.0") {
        exclude group: 'com.parse.bolts', module: 'bolts-android'
    }
    
    0 讨论(0)
  • 2020-12-14 03:27

    as react version has updated to 0.31.0,when you want to integrate com.facebook.fresco:animated-gif:0.10.0 which has com.parse.bolts has well,you may do like this:

     compile ('com.facebook.react:react-native:+') {
        exclude group: 'com.parse.bolts', module: 'bolts-tasks'
    }
    compile ('com.facebook.fresco:animated-gif:0.10.0'){
        exclude group: 'com.parse.bolts', module: 'bolts-tasks'
    }
    
    0 讨论(0)
  • 2020-12-14 03:29

    i encountered this recently on my react native project, you can go to your android folder of your project . and in terminal hit this command "./gradlew app:dependencies" to see dependencies tree. i found two package for android bolts under facebook sdk . if you exclude this package from facebook sdk things will work fine again

    compile ('com.facebook.react:react-native:+') {
       exclude group: 'com.parse.bolts', module: 'bolts-tasks'
    }
    
    0 讨论(0)
提交回复
热议问题