1Unable to load script from assets index.android.bundle on windows
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
#package.json下执行
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
flatlist 数据源data数据json结构不是数组对象
4 RN的view拖拽失效
[5 Runtime is not ready for debugging!]
解决方案:
重启mac
[6 Image source size {42, 32} does not match loaded image size {21, 16}]
解决方案:
检查资源文件a
a@2x.png分辨率不是a.png的两倍,修改资源文件确保@2x是其两倍,@3x分辨率是其三倍之后,问题解决。