Upgrading your React Native 0.57.4 project to React Native 0.59.10
Looking at upgrading your react native project to fix Xcode 11 build issue, follow these simple steps: (this took me quite a while at first try ๐)
Upgrade
react-native-community/cli
by runningnpm install -g @react-native-community/cli
oryarn add @react-native-community/cli
Then run
react-native upgrade 0.59.10
Fix all conflicts and merge where necessary
In package.json file make sure react is at version
16.8.3
and react-native is0.59.10
In android -> gradle.properties add
android.useAndroidX=true
andandroid.enableJetifier=true
For IOS, in Build Phases -> Link Binary With Libraries, add
JavaScriptCore.framework
Clear node_modules(
rm -rf node_modules
) andrun-react-native android
andreact-native run-ios
If you're using AsyncStorage, ListView, Slider, make sure to install libraries
Possible Errors
- Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Fix In android -> app -> build.gradle paste this inside android{} such that you have
android{
...
packagingOptions {
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libjsc.so'
pickFirst 'lib/arm64-v8a/libjsc.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
}
}