我有一个使用博览构建的,我们刚刚将它从SDK 35升级到SDK 36,但是它现在无法在Android和iOS上启动。在iOS上,它实际上会让世博会的应用程序本身崩溃,而在安卓系统上,它只是坐在一个白色的屏幕上。我假设这是一个依赖项的问题,但我通常不是,所以我不确定它是哪一个,但可能是基于下面的例外情况的NetInfo?
下面是来自iOS模拟器的几个日志。
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber
isEqualToString:]: unrecognized selector sent to instance 0x86ab4ddf6b4312df'***
First throw call stack:
(
0 CoreFoundation 0x00007fff23c4f02e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50b97b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c6ff94 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23c53dac ___forwarding___ + 1436
4 CoreFoundation 0x00007fff23c55f38 _CF_forwarding_prep_0 + 120
5 Exponent 0x00000001020ed764 -[ABI37_0_0RNCNetInfo detailsFromInterface:withState:] + 97
6 Exponent 0x00000001020ed51c -[ABI37_0_0RNCNetInfo currentDictionaryFromUpdateState:withInterface:] + 147
7 Exponent 0x00000001020ed44c -[ABI37_0_0RNCNetInfo getCurre<…>日志2
2020-09-07 08:38:42.448 [info][tid:com.facebook.ABI37_0_0React.JavaScript] │ '<decode: mismatch for [%c] got [STRING public sz:639]> next state', 'color: #4CAF50; font-weight: bold', { offline:
{ busy: false,
lastTransaction: 0,
online: false,
outbox: [],
retryCount: 0,
retryScheduled: false,
netInfo: { isConnectionExpensive: null, reach: 'NONE' } },
newCatchRecord: {},
signIn: { authToken: undefined, isSignedIn: false, userId: undefined, refreshToken: undefined, numRefreshRetries: 0 },
preferences: { vessels: [], gears: {}, ports: {},species: {} },
submissions: {},
_persist: { version: -1, rehydrated: false } }和package.json中列出的依赖项
"dependencies": {
"@expo/vector-icons": "^10.0.0",
"@redux-offline/redux-offline": "^2.6.0-expo.0",
"axios": "^0.18.0",
"bson": "^4.0.2",
"expo": "^36.0.0",
"expo-font": "~8.0.0",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"promise.prototype.finally": "^3.1.0",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"react-native-appearance": "~0.3.1",
"react-native-gesture-handler": "~1.5.0",
"react-native-screens": "2.0.0-alpha.12",
"react-native-simple-radio-button": "^2.7.3",
"react-native-status-bar-height": "^2.3.1",
"react-navigation": "^3.11.0",
"react-redux": "^6.0.1",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-persist": "^5.10.0",
"redux-persist-transform-encrypt": "^2.0.1",
"redux-thunk": "^2.3.0",
"styled-components": "^4.1.3",
"@react-native-community/netinfo": "4.6.0"
}发布于 2020-09-30 08:13:08
这是由netinfo 4.x.x升级到netinfo 5.x.x (特别是5.9.7)中的一个问题造成的。
https://stackoverflow.com/questions/63773400
复制相似问题