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

后端 未结 17 2234
[愿得一人]
[愿得一人] 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:18

    Do this:

    1. Go to Android Studio

    2. Open your project file

    3. Click on Build

    4. Click on Clean Project

    5. Build again with react-native run-android

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

    I have fixed by enabling the multiDex in the /android/app/build.gradle file.

    android {
      defaultConfig {
        .......
        multiDexEnabled true
      }
      ......
    }
    
    0 讨论(0)
  • 2020-12-30 01:20

    Got same error a couple of days back, seems you've got to enable multidex to true and delete the build folder.

    Go to android/app/build.gradle and add the line multiDexEnabled true and set minSdkVersion to 21 inside defaultConfig like this

    ...
    android{
      ...
      defaultConfig {
        ...
        minSdkVersion 21
        multiDexEnabled true
      }
      ...
    }
    ...
    
    

    You can check this thread out on react-native

    https://github.com/oney/react-native-gcm-android/issues/32

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

    I solve issue by enabling

    android {
        defaultConfig {
            // ...
            multiDexEnabled true
        }
        // ...
    }
    

    path : android/app/build.gradle

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

    Add the below line to your android/build.gradle file

        ext {
                googlePlayServicesVersion = "16.0.1"
                // ... rest of ext properties
            }
    

    https://github.com/idehub/react-native-google-analytics-bridge/wiki/Android-build-problems

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

    Add following to your android/app/build.gradle

    dependencies {
       ....
       implementation 'com.android.support:design:27.1.0'
       ....
    }
    
    0 讨论(0)
提交回复
热议问题