can't build flipper project in release (debug works)
See original GitHub issue🐛 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:9 (4 by maintainers)
Top GitHub Comments
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.
@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.