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

React Native Android Duplicate file error when generating apk #24618

Closed
wants to merge 1 commit into from
Closed

React Native Android Duplicate file error when generating apk #24618

wants to merge 1 commit into from

Conversation

mepritam
Copy link

Summary

I was getting an error "~/React-Native/xxxx/android/app/build/intermediates/res/merged/release/drawable-mdpi-v4/icon_logo: error: Duplicate file...
Native/xxxx/android/app/build/intermediates/res/merged/release/drawable-mdpi-v4/icon_logo_main: error: Duplicate file.
"

Changelog

  1. Changes on React.gradle
    [CATEGORY] [TYPE] - Message

Test Plan

  1. Generate apk from android studio

@facebook-github-bot
Copy link
Contributor

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
Copy link

Messages
📖

📋 Changelog Format - Did you include a Changelog? A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android

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 8218e4d

@react-native-bot react-native-bot added the Platform: Android Android applications. label Apr 26, 2019
@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 Apr 26, 2019
@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!

@guhungry
Copy link
Contributor

Duplicate with #24518

@hramos hramos self-assigned this Apr 26, 2019
@hramos
Copy link
Contributor

hramos commented Apr 26, 2019

I'll review and land #24518 first if possible. If #24518 gets merged, I'll close out this PR.

@Santu1245
Copy link

When you bundle the file using the following code:

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

duplicate image files get generated in the drawable folder in the following path:

"android/app/src/main/res/drawable-xxx/"

Delete all those duplicate files and run:

react-native run-android

It will generate apk file.

@cpojer
Copy link
Contributor

cpojer commented Apr 30, 2019

Closing because this is a duplicate.

@cpojer cpojer closed this Apr 30, 2019
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. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants