Ben*_*Rig 7 android reactjs react-native
我有以下代码,并且仅在我的 Android 设备上收到此错误: IllegalViewOperationException: Unable to run operation dispatchViewManagerCommand on view with tag: 1909 due to the view does not Exist
如果用户在输入字段中键入内容并按下一步,则会发生错误。如果输入字段为空,并且当我单击下一步时不会出现错误。
import React, { useContext, useEffect, useState, useCallback } from 'react';
import { TouchableHighlight } from 'react-native';
import { Text, View, TextInput } from 'react-native';
const TestScreen = () => {
const [page, setPage] = useState(0);
return (
<View
style={{
flex: 1,
marginTop: 30,
flexDirection: 'column',
position: 'relative',
}}
>
{page === 0 && (
<View>
<TextInput placeholder='Title' />
<TouchableHighlight onPress={() => setPage(page + 1)}>
<Text style={{ color: '#fff' }}>press</Text>
</TouchableHighlight>
</View>
)}
{page === 1 && (
<View>
<Text style={{ color: '#fff' }}>Hello</Text>
<TouchableHighlight onPress={() => setPage(page - 1)}>
<Text style={{ color: '#fff' }}>press</Text>
</TouchableHighlight>
</View>
)}
</View>
);
};
export default TestScreen;
Run Code Online (Sandbox Code Playgroud)
安卓版本11
软件包:“@react-native-community/async-storage”:“~1.11.0”,“@react-native-community/blur”:“^3.6.0”,“@react-native-community/hooks” :“^2.6.0”,“@react-native-community/masked-view”:“0.1.10”,“@react-native-community/netinfo”:“5.9.2”,“@react-native-社区/滑块”:“3.0.0”,“@react-native-community/viewpager”:“3.3.0”,“@react-native-firebase/analytics”:“^10.1.0”,“@react-导航/底部标签": "^5.8.0", "@react-navigation/material-bottom-tabs": "^5.2.16", "@react-navigation/native": "^5.7.3", “@react-navigation/stack”:“^5.9.0”,“aws-sdk”:“^2.827.0”,“axios”:“^0.21.0”,“babel-plugin-transform-inline-environment -variables": "^0.4.3", "date-fns": "^2.21.3", "expo": "~38.0.8", "expo-av": "~8.2.1", "expo -blur": "^9.0.3", "expo-constants": "~9.1.1", "expo-error-recovery": "~1.2.1", "expo-file-system": "~9.0 .1", "expo-firebase-analytics": "~2.4.1", "expo-font": "~8.2.1", "expo-image-picker": "~8.3.0", "expo-线性渐变”:“^8.2.2”,“博览会通知”:“~0.3.3”,“博览会权限”:“~9.0.1”,“博览会屏幕方向”:“~1.1。 1", "expo-splash-screen": "^0.5.0", "expo-status-bar": "^1.0.2", "expo-updates": "~0.2.10", "expo-video -player": "^1.6.1", "firebase": "^8.1.1", "jwt-decode": "^2.2.0", "moment": "^2.29.1", "react": “~16.11.0”,“react-aws-s3”:“^1.3.0”,“react-dom”:“~16.11.0”,“react-native”:“~0.62.2”,“react -native-blur": "^3.2.2", "react-native-calendars": "^1.1260.0", "react-native-cli": "^2.0.1", "react-native-dotenv" :“^2.5.0”,“react-native-easy-content-loader”:“^0.3.2”,“react-native-elements”:“^3.0.0-alpha.1”,“react-native -gesture-handler": "~1.6.0", "react-native-head-tab-view": "^3.0.2", "react-native-looped-carousel-improved": "^1.0.2" 、“react-native-popup-menu”:“^0.15.9”、“react-native-reanimated”:“~1.9.0”、“react-native-safe-area-context”:“3.0.7” , "react-native-screens": "~2.9.0", "react-native-scrollable-tab-view": "^1.0.0",“react-native-scrollable-tab-view-collapsible-header”:“0.0.5”,“react-native-smooth-picker”:“^1.1.4”,“react-native-status-bar-height” :“^2.6.0”,“react-native-svg”:“12.1.0”,“react-native-tab-view”:“^2.16.0”,“react-native-unimodules”:“〜0.10 .1", "react-native-vector-icons": "^7.0.0", "react-native-web": "^0.15.0", "splash-screen": "^4.0.1", " swr": "^0.3.11"
| 归档时间: |
|
| 查看次数: |
1499 次 |
| 最近记录: |