flipper: Cannot build Android Release with react-native-flipper 0.48.0+
🐛 Bug Report
react-native-flipper 0.48.0 breaks building Android in Release, presumably due to https://github.com/facebook/flipper/commit/03b231703ba1e609d8b5d31d71d07c57be1f0b29
Version 0.47.0 did not have this problem, although it had the problem in #1274, which the above change was trying to address.

To Reproduce
Very simple.
npx react-native init Testcd Testyarn add react-native-flipper- Open project in Android Studio
- Set Build Variant to “release”
- Try to build project
The build will fail, but if you change the version of react-native-flipper from 0.48.0 to 0.47.0, then it will succeed.
Environment
Since this is a build failure with a default-initialized React Native project, the only variable being react-native-flipper itself, I can’t think of any relevant environment info to add, but feel free to ask if you think there’s something I’ve missed.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 9
- Comments: 18 (11 by maintainers)
The fix has been released as react-native-flipper@0.54.0.
@micnguyen if you’re using
react-native-flipperdependency, install the0.47.0version@ObidosDev I solved on my project, I sent a PR that can resolve this problem here
@micnguyen Note that @b3coded 's tip will fix the build but mean that your release APK includes a few MB of Flipper libraries.
If that concerns you, manual linking is an effective workaround… but it’s a little nontrivial and hopefully it won’t be too much longer to get the fix in for this 🤞
May be need to create debug folder and return module for auto linking by
BuildConfig.DEBUGvalue and with reflection return FlipperModule instance if debug is true. (Very the same as forinitializeFlipperfrom installation part)Because root cause is auto generated
PackageList.javaAssumption:
List<NativeModule> createNativeModules(ReactApplicationContext reactContext)Hope it make sense 🧑💻