App doesn't open in emulator - android

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.

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.

React Native - Android Emulator Device

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

Cordova Android emulator black screen when running Cordova's hello world app

I'm trying to get started with Android development using Cordova by trying to build and run Cordova's "hello world" program following their Creating your first app guide. Nothing fancy - just trying to build and run the super-ultra-simple hello world program that gets created with the command cordova create hello com.example.hello HelloWorld.
I've successfully followed the instructions up through "Building the App" for Android. When I get to the step for "Test the App", it fires up the emulator, but all I get is a black screen in the android device frame and some error messages in the terminal for it. See screenshot of black screen w/ terminal output below:
From googling around on my own, I've come across the Failed to create D3D shaders error from the terminal output before with other OpenGL-based applications which have worked for me on other platforms. As far as I can tell, it seems to have something to do with ANGLE on Windows 7's version of Direct X, but I haven't been able to find any clear instructions on how to fix it.
The platform I'm using is Windows 7. The AVD I've got configured for the emulator is Nexus 5X using Android 7.0 x86 Nougat, using the default configurations provided by Android Studio v2.3.3. The version of Cordova I'm using is v7.0.1.
I have also confirmed that I am able to run the "hello world" app directly on a real Android device using cordova run android. It works successfully on there. So just running it in the emulator is the problem.
Help?

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.

VS Code and Chrome Debugger - How to debug Ionic App on Android Device?

How do I debug an Ionic app on an Android device using VS Code and Chrome Debugger?
Chrome Debugger (vscode-chrome-debug) documentation mentions that remote debugging can be done so I'm assuming that this means it can be done on an Android Device.
Can anyone give the steps and launch.json file for this?
Hi this one bothered me too for a period of time.
I use a simple approach to achieve this.
Run the command
cordova run android -debug
And I keep the android studio open along with it.
Now when your application is running on your device or simulator you can select that in Android studio and select the process you want to debug.
in android monitor you can get all the logs for that application.
Note:- It doesn't matter what application is open in Android Studio, as long your ionic app is in debug mode you can get logs there.

Categories

Resources