React Native - Android Emulator Device - android

For several hours now, I have tried to change the emulator that Android uses with no luck, the application will launch and run fine on the default Nexus 5. by using react-native run-android. but trying to run it on another emulator crashes, If I try to build from Android Studio, it will not connect to Metro.
I either launch the emulator in Android studio and it won't connect to the Metro bundler.
Or I launch it from the command line with CLI react-native run-android and it launches Nexus 5 and I can't do shit.
Why can't the emulators easier like ios (facepalm).
Please help me easily launch my react native app on a different emulator than the default. It's outrageous this is not a choice or option. I have tried for hours.
F**ken ANDROID HELL

check this out, you will surely find a solution. Its there in android official site
https://developer.android.com/studio/run/emulator-commandline

Related

How do i run my ionic android app on an emulator without installing/running the android studio?

Android studio is too heavy and slows down my pc for development. i am an ionic developer and i only need the android emulator to have a better test environment for my mobile application. I only make use of the android studio because i am trying to set up the virtual emulator following the steps in this video Ionic 3 Tutorial #16 Run app on Android Emulator
I will like to know if there is another way out to test and run my ionic app either on a real or virtual android emulator. I will like to know if i can run the emulator through my vs code or a lighter IDE
If you have set up the emulator already it is enough to execute "ionic cordova run android" in Visual Studio Code.
VSCode than checks for physical devices connected. If not, it will take the emulator.
Or you could use another emulator like Droid4X or BlueStacks.
=> Build the APK (ionic cordova build android) and install it on one of those.
One option might be use ionic serve to run it in the browser then in the console activate Toggle device toolbar is not android emulator but might be useful for mobile debug.

How can I run my react-native app on my physical Samsung S9 phone?

I know there are documents on this, but I have no clue how to get the app to actually show up on the phone. All I get after running is a Node.js window on my PC instead of phone.
I am using Expo for this purpose. There is a link to it https://expo.io/
It's pretty easy to set up and use.
When you run it from, for example, Visual Studio Code you can run it on your real device, just installing Expo app from AppStore/GooglePlay (Scan the QR code) as well as on PC in Android Studio etc.
Use expo
Expo enables you to run your react-native app on your local android or iOS simulator as well as physical devices.

react-native: Is there a method to run iOS simulator and Android simulator at the same time?

How to run ios and android simulator at the same time?
Now I use the ios simulator iPhone 6 and use the Genymotion to run Android.
I cd to my project path. I can run iOS simulator. I run Android simulator well too. Now only one simulator runs well when I run Android simulator and the iOS simulator at the same time. Then I select the iOS simulator and type command + R,the iOS simulator run well, and then the Android simulator show red screen, the text shows me:
I select the Android simulator and reload android. Then Android simulator is running well, but the iOS simulator screen become red, the error text shows:
The bash text is this:
Loading dependency graph...
React packager ready.
Loading dependency graph, done.
Bundling `index.ios.js` 100.0(1274/1274), done.
Bundling `index.android.js` 100.0(1126/1126), done.
Bundling `index.android.js` 100.0(1272/1272), done.
I see the two simulators do not run at the same time.
Is there a method to run the two simulators at the same time?
=======
I restart the mac and run the iOS and Android simulator, now two simulators run well at the same time.
You can simultaneously run both Android and IOS emulators with React-Native, but you can enable remote JS debugging in only one emulator at a time. If you happen to enable remote JS debugging in both emulator then one of the emulator will not work.

App doesn't open in emulator

When I run ionic serve the app opens in browser as normal and it works. When I do ionic emulate android to run the app on an Android Emulator on Windows, I get the following followed by the never ending dots (...).
What am I doing wrong?
Do you see any devices listed when you run adb devices on CMD'.
If not then it means you have not created any Device in Android Studio. Head over to Android Studio, Create Device and try again.

Phonegrap stalling on "trying to install app onto emulator"

I installed phonegap CLI on my Mac OSX 10.7.5 and used it to create the default "Hello World" app. I then issue the command phonegrap run android -emulator. This runs through the steps and then stalls at the point of "trying to install app onto emulator." The Emulator loads and is running as normal and I can navigate the emulator perfectly fine but the terminal just stalls and never actually installs the phonegap application. Anyone ran into this issue?
Yes, I ran into the same issue but on Ubuntu android emulator. The emulator started fine but the application actually not installed. I don't know why it happened. I googled around and someone said it might caused by the project name, you couldn't use space and dash in the project name. But it just doesn't work for me.

Categories

Resources