- 升級 Xcode 后 'config.h' file not found
解決辦法
cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh
2.'React/RCTBundleURLProvider.h' file not found
Xcode 左側(cè)點(diǎn)擊跟項目目錄 -> 選擇右側(cè) Build Settings -> 選擇 All & Combined -> 搜索框輸入 Always Search User Paths -> 將 Always Search User Paths 設(shè)置為 Yes -> Clean -> Build
圖2
3.js 中使用 parseFloat 損失精度問題
const num4 = "1.12"
const num5 = parseFloat(num4)*10000
console.log(num5)//11199.9999999
擴(kuò)大一定的倍數(shù),對結(jié)果在縮小這個倍數(shù)
var num1=parseFloat("234432.9")*1000000000000;
var num2=parseFloat("0.2")*1000000000000;
var num3=(num1-num2)/1000000000000;
4.編譯React Native IOS工程時诀姚,出現(xiàn)錯誤“fatal error: 'React/RCTEventEmitter.h' file not found”
xCode menu -> Product -> Scheme -> Manage Shemes...
Double click on your application
Build tab -> clear the tick on Pallelize Build
Scheme
clear the tick on Pallelize Build
- Text 組件問題
- 字體加粗后部分機(jī)器缺少字符 解決辦法添加 fontFamily: 'System'
<Text style={{fontWeight: 'bold', fontFamily: 'System'}}></Text>
錯誤將持續(xù)更新