Uh oh!
There was an error while loading. Please reload this page.
Fix duplicate resource error in Android gradle build (#22234) - #24778
Fix duplicate resource error in Android gradle build (#22234)#24778Dbroqua wants to merge 1 commit into
Conversation
facebook-github-bot
commented
May 9, 2019
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
pull-bot
commented
May 9, 2019
|
facebook-github-bot
left a comment
There was a problem hiding this comment.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
commented
May 9, 2019
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
facebook-github-bot
commented
May 9, 2019
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
radeno
commented
May 9, 2019
This PR could close #24759 |
react-native-bot
commented
May 9, 2019
This pull request was successfully merged by @Dbroqua in eb534bc. When will my fix make it into a release? | Upcoming Releases |
mikehardy
commented
May 9, 2019
Dbroqua
commented
May 9, 2019
You're welcome! |
DriesVS
commented
May 9, 2019
Awesome! Works with latest build tools 🚀 |
Summary: Pull requests #24518#24778 make Gradle copy all **generated** assets and resources into `android/app/src/res`, which is a bad behavior, because `src/res` goes into version control and should hold only those **original** resource files. These changes in #24518#24778 were merged into 0.60.0-rc release and cause regression. This pull request will: - Revert pull requests #24518#24778 - Close#25325 ## Changelog [Android] [Fixed] - Fix regression of improper assets copy (revert #24518#24778) Pull Request resolved: #25363 Test Plan: It is a revert pull request and the reverted script should work the same as it has in 0.59.x. Differential Revision: D15963329 Pulled By: cpojer fbshipit-source-id: 5619a318dbdb40e816e37b6e37d4fe32caa46e9e
Summary: Pull requests #24518#24778 make Gradle copy all **generated** assets and resources into `android/app/src/res`, which is a bad behavior, because `src/res` goes into version control and should hold only those **original** resource files. These changes in #24518#24778 were merged into 0.60.0-rc release and cause regression. This pull request will: - Revert pull requests #24518#24778 - Close#25325 ## Changelog [Android] [Fixed] - Fix regression of improper assets copy (revert #24518#24778) Pull Request resolved: #25363 Test Plan: It is a revert pull request and the reverted script should work the same as it has in 0.59.x. Differential Revision: D15963329 Pulled By: cpojer fbshipit-source-id: 5619a318dbdb40e816e37b6e37d4fe32caa46e9e
… (react#25363) Summary: Pull requests react#24518react#24778 make Gradle copy all **generated** assets and resources into `android/app/src/res`, which is a bad behavior, because `src/res` goes into version control and should hold only those **original** resource files. These changes in react#24518react#24778 were merged into 0.60.0-rc release and cause regression. This pull request will: - Revert pull requests react#24518react#24778 - Closereact#25325 ## Changelog [Android] [Fixed] - Fix regression of improper assets copy (revert react#24518react#24778) Pull Request resolved: react#25363 Test Plan: It is a revert pull request and the reverted script should work the same as it has in 0.59.x. Differential Revision: D15963329 Pulled By: cpojer fbshipit-source-id: 5619a318dbdb40e816e37b6e37d4fe32caa46e9e
Summary:
If
$buildDir/generated/res/react/${flavorPathSegment}release/rawcontains files duringgradle assembleReleasescript will fail withError: Duplicate resourceserror.This patch is based on this issue 22234 and pull request 24518.
Changelog
[Android] [Fixed] - Fix duplicate resource error for raw folder in Android build
Test plan
[CC from Mike Hardy PR]
Reports of success on the linked issue via use of the patch + patch-package for a couple months, I personally use it full time with all gradle builds (./gradlew clean assembleRelease or if you have a 'staging' flavor, e.g. ./gradlew clean assembleStagingRelease)
Related reading, also cross-links with the linked issue here:
https://stackoverflow.com/questions/53239705/react-native-error-duplicate-resources-android