React Native 升级为0.60后,会出现
null is not an object问题,现在的解决方案如下

Step 1 -- Disable autolinking for iOS and Not for Android
- module linked
react-native unlink react-native-gesture-handler --platform iOS
- module not linked
react-native link react-native-gesture-handler --platform android
Step 2 -- Create file in root project react-native.config.js
module.exports = {
dependencies: {
'react-native-gesture-handler': {
platforms: {
ios: null, // disable ios platform, other platforms will still autolink
},
},
},
};
Step 3 -- Pod iOS and install jetify
For iOS
pod install on iOS folder
cd ios
pod install
For Android
npm install -save-dev jetifieroryarn add -D jetifier- add script in
package.jsonfile
"scripts": {
...
"postinstall":"npx jetify"
},
- Run
npm installoryarn;