flipper icon indicating copy to clipboard operation
flipper copied to clipboard

can't build flipper project in release (debug works)

Open frannois opened this issue 7 years ago • 9 comments

🐛 Bug Report

./gradlew assembleDebug works /gradlew assembleRelease does not work

stack trace {path}/flipper/sample/FlipperSampleApplication.java:16: error: package com.facebook.flipper.plugins.navigation does not exist import com.facebook.flipper.plugins.navigation.NavigationFlipperPlugin; ^ {path}/flipper/android/sample/src/main/java/com/facebook/flipper/sample/MainActivity.java:15: error: package com.facebook.flipper.plugins.navigation does not exist import com.facebook.flipper.plugins.navigation.NavigationFlipperPlugin; ^ {path}/flipper/android/sample/src/main/java/com/facebook/flipper/sample/DeepLinkActivity.java:12: error: package com.facebook.flipper.plugins.navigation does not exist import com.facebook.flipper.plugins.navigation.NavigationFlipperPlugin; ^ 3 errors 2 warnings

To Reproduce

Run ./gradlew assembleRelease

Expected Behavior

build is successful

Environment

Macbook : I tried building master, tag v0.28.0 and tag v0.27.0

frannois avatar Nov 20 '19 21:11 frannois

Hello @frannois, thank you for reporting bug. I will try to reproduce and get back to you

cekkaewnumchai avatar Nov 20 '19 23:11 cekkaewnumchai

@frannois It sounds like you've declared Flipper as a debugImplementation dependency. If you do this, you cannot reference any Flipper code in your release builds. This is by design as Flipper code should never be bundled into your production builds.

passy avatar Nov 21 '19 15:11 passy

@passy I am not talking about building my application with Flipper. I am talking about building the flipper github project.

frannois avatar Nov 21 '19 16:11 frannois

Last night master github project was failing for another reason, native though.

frannois avatar Nov 21 '19 16:11 frannois

Thanks for the clarification! Will give that a try.

passy avatar Nov 22 '19 10:11 passy

Now I feel really stupid. Sorry, you're completely right. We must have broken this quite a while ago. Fix for it is coming and I'll make sure to add a CI job for preventing this from happening again. Thanks for the report!

passy avatar Nov 22 '19 14:11 passy

Hi, @passy and @frannois I am facing the same issue after upgrading it to "react-native": "^0.62.2" It works in debug but in a release, it shows same as mentioned by @frannois. After Commenting on a flipper class while creating a build but when I use debug I have to uncomment to use a flipper. It is a wrong practice to comment and uncomment code. Kindly Suggest any solution for this.

vaibsshukla avatar May 17 '20 15:05 vaibsshukla

I have the same problem. After upgrade to RN 0.62.2 I cannot build the app in release mode.

ReactNativeFlipper.java:10: error: package com.facebook.flipper.android does not exist import com.facebook.flipper.android.AndroidFlipperClient;

ahanusek avatar May 20 '20 06:05 ahanusek

Ah, I had to move ReactNativeFlipper file to debug folder from main.

ahanusek avatar May 20 '20 07:05 ahanusek