React Native 升级为0.60后,会出现
null is not an object
问题,如今的解决方案以下react
react-native unlink react-native-gesture-handler --platform iOS
复制代码
react-native link react-native-gesture-handler --platform android
复制代码
react-native.config.js
module.exports = {
dependencies: {
'react-native-gesture-handler': {
platforms: {
ios: null, // disable ios platform, other platforms will still autolink
},
},
},
};
复制代码
pod install on iOS folderandroid
cd ios
pod install
复制代码
npm install -save-dev jetifier
or yarn add -D jetifier
package.json
file"scripts": {
...
"postinstall":"npx jetify"
},
复制代码
npm install
or yarn
;