Code: Select all
node --version
v18.19.1
npm expo --version
9.2.0
app.js
Code: Select all
import { Text, View } from 'react-native';
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import Home from "./screens/Home";
import About from './screens/About';
const Stack=createNativeStackNavigator();
export default function App() {
return (
);
}
Code: Select all
import { Button, Text, View } from "react-native";
export default function Home({navigation}){
return (
Home
navigation.navigate("About")} title="Go to about"/>
);
}
Code: Select all
{
"expo": {
"name": "app1",
"slug": "app1",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"edgeToEdgeEnabled": true,
"package": "com.kardimon57.app1"
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "7d4011bb-176d-4861-bb81-fa7f9f0c4cc9"
}
}
}
}
Code: Select all
{
"cli": {
"version": ">= 16.7.0",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"android": {
"buildType": "apk"
},
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {}
}
}
Ich habe auch die .APK -Datei auf zwei Geräten getestet. Ich bekomme den leeren Bildschirm.