首页 > 解决方案 > 我更改了 Android 模拟器,我的应用程序在本机反应中有 marginTop

问题描述

我正在做大学项目。我在 Windows 10 上使用 react native 和 android 模拟器。我的旧模拟器生病了(打字时冻结,每次都响应“系统崩溃”)。然后我删除了模拟器并创建了新的模拟器。创建新设备后,我从 android 10 更新到 android 11。最后我打开我的应用程序,顶部有一个我不明白的空间。

{
  const App = () => {
  const isSignedIn = useSelector((state) => state.isUserSignedIn);
  return (
  <PaperProvider theme={theme}>
   <NavigationContainer>
    {!isSignedIn ?
      <Stack.Navigator screenOptions={{ headerShown: true }}>
        <Stack.Screen name="SignIn" component={SignIn}
                      options={{ presentation: "fullScreenModal", headerShown: false, 
                      headerBackVisible: false }} />
        <Stack.Screen name="SignUp" component={SignUp} options={{
          presentation: "fullScreenModal",
          headerBackVisible: true,
          title: "KAYIT OL",
          headerTitleAlign: "center",
        }} />
      </Stack.Navigator>
      :
      <Tabs.Navigator options={{ headerShown: false }} screenOptions={({ route }) => ({
        tabBarIcon: ({ focused, color, size }) => {
          return <Icon name={route.name === "Başvurular" ? "albums" : "person"} 
           type="ionicon" color={color}
                       size={size} />;
        },
        headerShown: false,
      })}>
        <Tabs.Screen name="Başvurular" component={ApplicationStackScreen} />
        <Tabs.Screen name="Profil" component={ProfileStackScreen} />
      </Tabs.Navigator>
    }
  </NavigationContainer>
</PaperProvider>
);
};
}

我的模拟器ss

标签: androidreactjsreact-nativeandroid-emulatoremulation

解决方案


推荐阅读