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
;