React Native: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'

后端 未结 17 2236
[愿得一人]
[愿得一人] 2020-12-30 01:15

I\'ve tried gradlew clean and every other solution available here and on GitHub but the error doesn\'t match and solution doesn\'t work

Error on cmd A

相关标签:
17条回答
  • 2020-12-30 01:32

    This will fix it cd android && ./gradlew clean

    0 讨论(0)
  • 2020-12-30 01:33

    In the file (<your_project_folder>/android/app/build.gradle), amend the code with the following lines:

    android {
        ...
       packagingOptions {
           pickFirst '**/libjsc.so'
       }
    }
    

    Reference: https://github.com/react-native-community/jsc-android-buildscripts/issues/80

    0 讨论(0)
  • 2020-12-30 01:33

    I confronted with this error

    Execution failed for task ':app:multiDexListDebug'.

    but He wrote in the continuation of my error that

    I installed async-storage from two address and when I remove the second

    errors have been fixed

    "@react-native-async-storage/async-storage": "^1.13.2",
    
    "@react-native-community/async-storage": "^1.12.0", 
    
    0 讨论(0)
  • 2020-12-30 01:35
    At Path android/app/build.gradle
    
    defaultConfig {
    multiDexEnabled true //Add this line
    }
    

    https://github.com/react-native-community/react-native-webview/issues/1344

    0 讨论(0)
  • 2020-12-30 01:35

    you probably have to add the multiDexEnabled true property to your android/app/build.gradle file.

    defaultConfig {
        multiDexEnabled true
    
        // (...) more properties
    }
    

    The console error gives you a hint to overcome this problem. They show you this very link: https://developer.android.com/studio/build/multidex

    you can learn more about the problem there. But this was my solution here in 2020. Peace!

    0 讨论(0)
  • 2020-12-30 01:35

    Had to use latest dex version

    implementation 'androidx.multidex:multidex:2.0.1'
    
    0 讨论(0)
提交回复
热议问题