What is the article
I tried upgrade react-native v0.57.7. to v0.58.4.
This article is the saga of upgrading.
Steps
At first, upgrade react-native to v0.58.4, , react to 16.6.1 and metro-react-native-babel-preset to 0.51.1 by yarn or npm.
You might meet errors when yarn react-native ios or android.
Additional steps here.
For iOS
Mentioned from changelog, you need to link JavaScriptCore.framework as librariy by manual.
It's all done when my use case.
For Android
Upgrading for android is a bit complicated, follow the changelog
I met error of More than one file was found with OS independent path 'lib/x86_64/libjsc.so' same as this issue comment
So, I fixed errors by modifying build.gradle files.
The final result of files are following.
android/build.gradle
...
ext {
...
buildToolsVersion = "28.0.2"
compileSdkVersion = 28
...
}
android/app/build.gradle
android {
...
packagingOptions {
pickFirst 'lib/x86_64/libjsc.so'
pickFirst 'lib/arm64-v8a/libjsc.so'
}
...
}
Conclusion
I hope these tips are helpful for you.
Have a habby react-native developing!
Top comments (1)
Thanks for the guide! The packingOptions didn't work for me. I used this github.com/react-native-community/...