react-native-reanimated: Build from source doesn't generate same .so files
Description
Hey! We recently needed to patch this package to try fixing ANRs on android, but the rn-patch of native didn’t work. We enabled the flag to force rebuild native to include patch changes too. While it works and successfully patches, the .so file generated is smaller in size compared to the .so files shipped with npm package. The app is still working and no animation issues so far. But what could be the reason of smaller .so files generated?
Steps to reproduce
- Enable gradle flag to force rebuild reanimated
reanimated = [ buildFromSource: true ]
- Generate 2 apks with
buildFromSource
true and false. - Diff apks in Android Studio and compare .so file sizes
Snack or a link to a repository
–
Reanimated version
2.9.1
React Native version
0.68.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
No response
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Real device
Device model
No response
Acknowledgements
Yes
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 28 (25 by maintainers)
When npm package is built (I guess this file https://github.com/software-mansion/react-native-reanimated/blob/2.9.1/createNPMPackage.sh), it doesn’t have
minSdkVersion
passed and takes the default 16 specified in gradle file