I just installed a fresh react native app using
npx create-expo-app --template tabs
Then I proceeded with the following command
npx expo prebuild
Which ran and completed successfully. So I’m trying to run my app on my android emulator using the command npx expo run:android
but I get an error I don’t understand as shown on the image below.
The error I get when try to run my app
package.json
{
"name": "fin",
"main": "expo-router/entry",
"version": "1.0.0",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/vector-icons": "^14.0.0",
"@react-navigation/native": "^6.0.2",
"expo": "~50.0.17",
"expo-font": "~11.10.3",
"expo-linking": "~6.2.2",
"expo-router": "~3.4.10",
"expo-splash-screen": "~0.26.5",
"expo-status-bar": "~1.11.1",
"expo-system-ui": "~2.9.4",
"expo-web-browser": "~12.8.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.6",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-web": "~0.19.6"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "~18.2.45",
"jest": "^29.2.1",
"jest-expo": "~50.0.4",
"react-test-renderer": "18.2.0",
"typescript": "^5.1.3"
},
"private": true
}
app.json
{
"expo": {
"name": "fin",
"slug": "fin",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "fin",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.jbac76.fin"
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router"
],
"experiments": {
"typedRoutes": true
}
}
}
tsconfig.json
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"paths": {
"@/*": [
"./*"
]
}
},
"include": [
"**/*.ts",
"**/*.tsx",
".expo/types/**/*.ts",
"expo-env.d.ts"
]
}
I hope the information I have provided is enough. I have googled this issue for hours with no success, This is my last hope so I appreciate in advance.
Tried to reinstall my android studio and emulator.
Tried to reinstall node js.
Tried to reinstall jdk.
Tried to re-create the project.
Tried to clear cache.
All in all I’m relatively new to this so i wasn’t sure what to try other than googling for solutions.
By the way, I was following a youtube tutorial by Simon building a Fintech clone with react-native.