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

Android: exclude ReactNativeFlipper.java from release build #28257

Closed
wants to merge 1 commit into from

Conversation

acro5piano
Copy link

@acro5piano acro5piano commented Mar 7, 2020

Summary

Exclude ReactNativeFlipper.java from build files in release build.

I faced a lot of errors like com.facebook.flipper.*** does not exist during ./gradlew assembleRelease (see a screenshot below) and it prevents creating release apk file. I think this is because we build java sources of Flipper as debugImplementation.

image

Changelog

[Android] [Changed] - exclude ReactNativeFlipper.java from release build

Test Plan

./assembleRelease works.

I think #28052 might effect this modification of template file.

@facebook-github-bot
Copy link
Contributor

Hi @acro5piano!

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 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.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@acro5piano acro5piano changed the title exclude ReactNativeFlipper.java from release build Android: exclude ReactNativeFlipper.java from release build Mar 7, 2020
@react-native-bot react-native-bot added the Platform: Android Android applications. label Mar 7, 2020
@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 7, 2020
@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!

@analysis-bot
Copy link

RNTester.app (iOS): 10715136 bytes

@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!

@safaiyeh
Copy link
Contributor

safaiyeh commented Mar 18, 2020

Hi @acro5piano ReactNativeFlipper should be in your debug config. https://github.com/facebook/react-native/tree/master/template/android/app/src/debug/java/com/helloworld

Notice the directory template/android/app/src/debug/..., this already prevents ReactNativeFlipper from showing up in your release build!

Could you demonstrate this happens with a fresh template, if it doesn't there it is an issue with your project's setup.

@acro5piano
Copy link
Author

@safaiyeh
Thank you for your response.

Ah okay, I'll check it later!

@acro5piano
Copy link
Author

Sorry for the delay, but I confirmed my project and move ReactNativeFlipper.java from app/src/main to app/src/debug and the problem fixed.
I migrated from 0.59 to 0.62, and misplaced it. Thank you for the help.

@acro5piano acro5piano closed this Apr 10, 2020
@acro5piano acro5piano deleted the skip-flipper-release branch April 10, 2020 08:38
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.

5 participants