React Native Duplicate resources

前端 未结 8 647
感情败类
感情败类 2020-12-06 06:10

After upgrading to React Native 0.57 i am facing an issue when genrating APK in react-native-router-flux.when executing the .\\gradlew assembleRelease i get below error :-<

相关标签:
8条回答
  • 2020-12-06 06:52

    You need remove generated resources/drawable and generate again.

    rm -rf android/app/src/main/res/drawable-*
    react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
    

    And compile android again react-native run-android

    0 讨论(0)
  • 2020-12-06 06:52

    [0.57] Ugly workaround

    If you don't want to rollback the react-native version, you can just rollback the react.gradle to the last working version. That worked for me.

    Copy the git code to node_modules/react-native/react.gradle

    https://github.com/facebook/react-native/blob/2d9e2f30e17b8e79f2c44ef533ecdd550671304c/react.gradle

    If the problem persists, try to remove the if (isAndroidLibrary) on doLast.

    0 讨论(0)
提交回复
热议问题