1Unable to load script from assets index.android.bundle on windows
image.png
mkdir android/app/src/main/assets
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
react-native run-android
2 Invariant Violation: requireNativeComponent: "BVLinearGradient" was not found in the UIManager
image.png
#package.json下執(zhí)行
npm install react-native-linear-gradient --save
#ios Podfile
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
3 Invariant Violation: Tried to get frame for out of range index NaN
image.png
flatlist 數(shù)據(jù)源data數(shù)據(jù)json結(jié)構(gòu)不是數(shù)組對象
4 RN的view拖拽失效
image.png
[5 Runtime is not ready for debugging!]
5.png
解決方案:
重啟mac
[6 Image source size {42, 32} does not match loaded image size {21, 16}]
image.png
解決方案:
檢查資源文件a
a@2x.png分辨率不是a.png的兩倍洋闽,修改資源文件確保@2x是其兩倍把敢,@3x分辨率是其三倍之后念恍,問題解決磅摹。