mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-29 22:53:52 +08:00
This change fixes two crashes related to fragment library. The first issue was a crash caused by return transaction started while the previous transaction was ongoing (e.g., quickly adding new screen on top of the stack and immediately dismissing it). The main fix was applied in the fragment library and therefore as a part of this change we update the dependency to fragment:1.2.1 which is the current latest stable version. As a result of the fragment library change we started observing other issue. The second issue was caused by the fact that under certain circumstances the view associated with a fragment couldn't been added despite it still being attached to a parent. This was resulting in a crash. This change adds a cleanup code that properly detaches the view: we do it in onCreateView but also when the fragment destroys its view (in onViewDestroy callback). The latter is necessary because when fragments are restored the order of onCreateView calls is reversed which causes inner views to attach despite their fragment managers not being initialized.
README
If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm:
- Be sure to have the Android SDK and NDK installed
- Be sure to have a
local.propertiesfile in this folder that points to the Android SDK and NDK
ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/{username}/Library/Android/sdk
- Delete the
mavenfolder - Run
sudo ./gradlew installArchives - Verify that latest set of generated files is in the maven folder with the correct version number