react-native 编译出现 ld: library not found for -lDoubleConversion 错误的解决方案
作者:互联网
I had this issue a bit ago after upgrading to RN 0.59.
The solution that worked for me, was to delete the ios/build
folder, and then do this:
cd ios
pod install
When I did that, I saw an error about Folly
, and people were recommending to do this:
pod deintegrate
pod install
I did that, but it will still throwing the error about Folly
, so I deleted the Podfile.lock
because pods was holding onto an old version of Folly that was incompatible with RN 0.59.
NOTE: I found a post by someone that said deleting the entire lock file isn't recommended. Instead, you should delete only the relevant lines in the lock file, the lines that pertain to Folly. I had already deleted the lock file, but everything worked out ok.
I ran pod update
which updated a bunch of stuff and completed successfully.
The next time I ran pod install
, it produced a nice list of green, successful installs.
Then I did react-native run-ios
again, and it worked for the first time in a while, except it produced the red screen of death.
So I deleted my app off the iOS simulator device, then ran:
rm -rf node_modules
npm install
killall -9 node
The killall -9 node
is just to kill the Metro Bundler. It is my favourite sweeping command for that. If you are running like twelve node.js APIs on your machine, maybe instead do something like sudo lsof -i :8081
and find the process ID for Metro Bundler(s) and kill those by PID. For example if you see Metro Bundler is running as PID 27322, then do kill -9 27322
.
Then I ran this in a standalone terminal:
npm start -- --reset-cache
back in the VS Code integrated terminal:
react-native run-ios
IT WORKED !!!!!!!!
Then I ran:
react-native run-android
that worked but got stuck at 0% on the simulator device, so I deleted the APK off the simulator and ran react-native run-android
again.
IT WORKED !!!!!!!!
标签:do,ld,ran,Folly,library,react,pod,native 来源: https://www.cnblogs.com/levenies/p/10999994.html