首页 > 解决方案 > 异常 '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x60000140a440' 在目标上调用 canOpenURL 时被抛出

问题描述

异常 '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x60000140a440' was throwed while calling canOpenURL on target LinkingManager with params ("about:srcdoc", 41622, 41623

我在我的 React-Native 应用程序中尝试使用 WebView 时遇到了这个问题。我只在 iOS 中看到这个错误,android 运行良好。这是我的 WebView 代码。

返回 (

    <View style={{ flex: 1, }}>
        <SafeAreaView style={{ flex: 1, }}>
            {renderHeader()}
            <WebView  
             source={{uri: 'https://medmate.com.au/frequently-asked-questions/'}}  
            renderLoading={() => (
                <ActivityIndicator
                    color={colors.BUTTON_BG}
                    size='large'
                    style={{position: 'absolute',
                    width: '100%',
                    height: '100%',
                    backgroundColor: 'white',
                    alignSelf: 'center',
                    justifyContent: 'center',
                    top: 0,
                    left: 0,
                    right: 0,
                    bottom: 0,
                    zIndex: 10,
                    elevation: 1000,}}
                />
            )}

/>
这是模拟器错误。 https://i.stack.imgur.com/ObQRO.png

这是我的 package.json 文件:

1.https://i.stack.imgur.com/e9ftl.jpg 2.https: //i.stack.imgur.com/nbnOf.jpg

标签: react-native

解决方案



推荐阅读