Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for [Android] Error: Duplicate resources #31204

Closed
wants to merge 2 commits into from

Conversation

reyn-nova
Copy link

@reyn-nova reyn-nova commented Mar 21, 2021

Summary

I keep getting error Android Duplicate Resources when building on Android, then I found #22234, i saw a comment that fix my problem by patching react.gradle with code like in this commit, this works on my machine.

Changelog

Android Fixed - Fix assmbleRelease build

Test Plan

AssembleRelease basic react-native project

@facebook-github-bot
Copy link
Contributor

Hi @a-nice-username!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign 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 to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@pull-bot
Copy link

pull-bot commented Mar 21, 2021

Messages
📖

📋 Verify Changelog Format - A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

Generated by 🚫 dangerJS against 52049e8

@facebook-github-bot
Copy link
Contributor

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 facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 21, 2021
@analysis-bot
Copy link

analysis-bot commented Mar 21, 2021

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 232d02c

@analysis-bot
Copy link

analysis-bot commented Mar 21, 2021

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,717,940 +0
android hermes armeabi-v7a 7,246,007 +0
android hermes x86 8,137,533 +0
android hermes x86_64 8,103,013 +0
android jsc arm64-v8a 9,637,130 +0
android jsc armeabi-v7a 8,552,720 +0
android jsc x86 9,650,995 +0
android jsc x86_64 10,260,163 +0

Base commit: 232d02c

@bang9
Copy link
Contributor

bang9 commented Mar 30, 2021

don't run 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

If the assets(--assets-dest android/app/src/main/res) is not extracted, it is not duplicated.

@cortinico
Copy link
Contributor

Thanks for sending the PR. I'm closing this as the logic is completely rewritten now and uses AGP artifacts API

@cortinico cortinico closed this Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants