不变违规:模块 AppRegistry 不是已注册的可调用模块(调用 runApplication) - 反应原生

时间:2021-02-14 09:35:35

标签: reactjs react-native react-native-android react-navigation

我不知道这段代码有什么问题。 我使用反应导航,它工作得很好,但我莫名其妙地出现了错误。 我认为导航有问题

这里是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>
   );
}

所以,如果您知道出了什么问题,请帮忙

1 个答案:

答案 0 :(得分:1)

可以清缓存杀掉allnode,不然代码有问题