我不知道这段代码有什么问题。 我使用反应导航,它工作得很好,但我莫名其妙地出现了错误。 我认为导航有问题
这里是Github Repo
所以这是 Home.js
const Home = ({ navigation }) => {
return (
<>
<ImageBackground source={require('../images/wall.jpeg')} style={styles.back}>
<View style={styles.box}>
<Image source={require('../images/logo.png')} style={styles.logo}/>
<TouchableOpacity onPress={() => navigation.navigate('Questions')}>
<View style={styles.container}
>
<Image source={require('../images/game.png')} style={styles.icons}/>
<Text style={{fontFamily: 'bpg_extrasquare_mtavruli_2009', fontSize: 20}}>გასართობი</Text>
</View>
</TouchableOpacity>
<TouchableOpacity onPress={() => navigation.navigate('Questions')}>
<View style={styles.container2}>
<Text style={{fontFamily: 'bpg_extrasquare_mtavruli_2009', fontSize: 20}}>ცენზურა</Text>
<Image source={require('../images/hand.png')} style={styles.icons}/>
</View>
</TouchableOpacity>
<TouchableOpacity onPress={() => navigation.navigate('Questions')}>
<View style={styles.container3}>
<Image source={require('../images/gender.png')} style={styles.icons}/>
<Text style={{fontFamily: 'bpg_extrasquare_mtavruli_2009', fontSize: 20}}></Text>
</View>
</TouchableOpacity>
</View>
</ImageBackground>
</>
);
};
const Stack = createStackNavigator();
function MyStack() {
return (
<Stack.Navigator
>
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Questions" component={Questions} />
</Stack.Navigator>
);
}
所以,如果您知道出了什么问题,请帮忙
答案 0 :(得分:1)
可以清缓存杀掉allnode,不然代码有问题