When running expo start the app is compiled and working but when pressing 'a' to start it in the android emulator it fails to load the app.
I tried removing .expo folder and let 'expo start' recreate it and I checked if they are using the same subnetwork which I think should not even be the case because I am starting both expo server and android emulator in the same machine.
Expo version: 33.0.0. Expo cli version: 3.4.1. React version: 16.8.6. React Native version 0.59.8.
Thank you.
Please find the images below for more details and let me know if you need any other detail provided:
Error Message after pressing 'a' to run the emulator
Setting.json file in .expo folder
packager-info.json file in .expo folder
Related
After opening my React Native project in Expo, I get a "New update available, downloading..." infinite loading on the Android emulator.
I tried restarting the server and restarting the emulator, expecting to see the actual content of my React Native application.
I managed to solve this problem by following these steps:
Stop the server.
Uninstall Expo on Android emulator.
Run npm start.
Reopen the application on Android emulator.
I'm pretty new to the expo and developing a mobile app, currently I'm using expo dan react native
I've built an app with the expo and I want to open it on another laptop, so I use GitHub to commit my work there
on the new laptop I already installed expo, node, vs, etc. i cloned the project and can't start it on my new laptop with "npm start"
it shows error like this
"Cannot determine which native SDK version your project uses because the module expo is not installed"
which I already checked on my cmd with expo --version
TL: DR how do I start the expo on another laptop with GitHub?
I already fixed the issue, the console recommended me to do yarn add expo , i already did the yarn add expo before writing this question and it didnt fix me thats why i thought there is something i need to do other than doing that
so after exploring expo documentation and found nothing , i just tried to do yarn add expo BUT in my cmd , not in my console on vs code
it worked perfectly for me and the strange thing is , i cant debug expo in my phone with LAN connection, which now i have to use tunnel connection for this to work where in my old computer i use the LAN connection perfectly fine
TLDR : do yarn add expo in cmd not in vs code console
Did you already clone your repo to your new machine?
If not you should download your code to your new laptop.
Next you will have to cd to the directory of your app in your terminal.
Afterwards you’ll have to run
expo install
And after this is done you can run the following command (still in your app folder)
expo start
I have created one react-native app using expo and atom editor. It's running fine in android device and iOS simulator but with the help of expo. What I want is to generate Apk(debug) so that I can directly run on device. How can I do it ? I followed this(Dmitry Mugtasimov's answer). should I run all those command inside project folder ? Also I don't find index.js file inside my project folder. Also if someone know how to run on iOS simulator by creating app like file(don't know what is that in Ios because from android background). Please help, thanks
Since you have used Expo to develop your react-native app you can build the android app by going to the project folder and running the bellow command in the terminal
expo build:android
The building process will take around 5-10 minutes. When your build is done, expo build:status will give you your .apk file url. If not, it will say your build is still in progress and to try again later.
Also to build the iOS app you can run,
expo build:ios
To build the iOS standalone app you will need to have an Apple Developer account, but for Android standalone app you don't need a Google Play Developer account.
For the above commands to work you need to have expo-cli installed, For this you can run the bellow command,
npm install -g expo-cli
More Info: https://docs.expo.io/versions/latest/distribution/building-standalone-apps/
If you don't have an Apple Developer Account. You can build the iOS
standalone simulator build using the command,
expo build:ios -t simulator
And then wait for build to finish then download and unpack YourAppName.tar.gz. Then, start the iOS simulator and run xcrun simctl install booted YourAppName.app to run the .ica file.
More info: Expo / React-Native, Is it there a way to test-run standalone iOS apps on a device/simulator?
I'm running my project on expo. After running expo eject, I'm getting the following error:
The Expo SDK requires Expo to run
Even for a brand new project I'm getting this error and I cannot do anything with expo anymore.
I run :
expo init Project1
and then going inside the Project1 direcotory and run:
expo start // and then click 'a' for running project on android emulator.
and emulator screen shows this error.
If you have logged into the command line on your computer, log out and try reloading the app. Otherwise reinstall expo and try again.
I just moved to Ubuntu from Windows 10, I have installed react-native on my laptop and everytime I do react-native init it creates a project as expected. react-native run-android & react-native start commands are working as you'd expect them to be.
My main problem is I just copied a react native project from my Windows 10 machine to Ubuntu and now everytime I do react-native run-android This is the error I see on my console
This is the error I see on my console
Starting JS server...
Running /home/adeel/Android/Sdk//platform-tools/adb reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && ./gradlew installDebug...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
The problem was the React Native project was created in Windows and I was trying to run it in a Linux based platform. So what I did was I created a brand new project in my Linux environment and copied my RN code in the newly created project.
This was I believe due to the android file it created which is platform dependent. Windows and Linux have different GRADLE files. I hope this helps anyone who is having this issue.
Seems like it is not recognizing your device/emulator. Run "adb devices" to check. I guess you did the whole Android setup and installed Android Studio (SDK).