ionic emulate android on bootup still showing dots after 30 mins - android

So I ran ionic emulate android and this is what I'm seeing on my console
Booting up emulator (this may take a while)..............................................................................................................................................................
It's still is continuing to show dots
I ran this to check if HAXM is loaded and looks good
$ kextstat | grep intel
161 0 0xffffff7f839aa000 0x14000 0x14000 com.intel.kext.intelhaxm (6.0.1) <7 5 4 3 1>
The Samsung avd I created showed up but it's just blank screen
What am I doing wrong? The project that I used is https://github.com/driftyco/ionic-starter-sidemenu
Any ideas?

Just restart the virtual device solved my problem! I use Android Studio.
I had the same problem when I run following command:
ionic cordova emulate android
It prints a lot of dots like this:

Those infinite dots happen when your virtual device doesn't load correctly.
Just restart it and the problem is solved.

Related

Nativescript emulator installation headaches

I've been trying to get emulators to work for NativeScript on my brand new clean Windows 10 laptop for three days and nothing is working.
To be more accurate, I think I was able to get the 'emulator-5554' to launch, but it doesn't not load the Groceries app.
I have all the Angular requirements installed since I also build Angular SPAs and they work fine. I read and followed all these articles, and I still can't get emulators to work.
I even installed GenyMotion, but it is not detected. I have not installed Android Studio since I'll be developing with Visual Studio Code, so I used the Android CLI to install the SDK.
https://docs.nativescript.org/start/general-requirements
https://docs.nativescript.org/start/introduction
https://docs.nativescript.org/start/cli-basics
https://docs.nativescript.org/tooling/android-virtual-devices?_ga=2.188319272.1221867054.1547512018-618552819.1547075699
https://docs.nativescript.org/start/quick-setup
https://docs.nativescript.org/start/ns-setup-win - this was my primary emulator setup
I have also read many SO posts and none have solved my problem.
Is there some documentation somewhere that is simple and clear, with step by step instructions on how to get emulators installed that will work with Nativescript? What am I missing?
BTW, when I connect my Samsung Galaxy S8 Active phone to my laptop, it's not recognized by the tns device command either.
I can't believe it's this difficult to get emulators to work. I also can't believe that the Nativescript documentation has left this information out of their instructions.
This might not be the answer most are looking for, but this is what was wrong with my installation and this is how I fixed it:
I noticed that the docs all had $./advmanager [someArg] and I had to be sudo for commands to execute. So I ran sudo chown -R myUser:myUser /usr/local/android thus changing all owner:group permissions from root to myUser.
then I could run ./avdmanager create.... (full command below) without having to be superuser
restarted Nativescript Sidekick
I know this is kinda stupid, but I worked out that if the AVD was created as root, the Sidekick program running as myUser could not see and access it. This was confirmed when I ran avdmanager list avd as sudo and got a result, but after changing my files' ownership from root to myUser, nothing was listed from the same command.
I recreated my virtual devices (AVDs) as a normal user and Sidekick was able to see them.
edit: the actual line I ran to create the AVD (because I see a lot of variation in these):
$ ./avdmanager create avd --name Pixel -k "system-images;android-28;google_apis;x86" --device "pixel"?
The uppercase and lowercase "pixel"s come from one entry from the output of
$./avdmanager list
id: 17 or "pixel"
Name: Pixel
OEM : Google
---------
Do this "create" step for each device you want to emulate.
Install Android Studio and open it. Then (without starting a new project) click on:
Configure --> AVD Manager.
There you can create virtual devices, which will be recodnized by NativeScript Sidekick and its virtual device launcher.

Android emulator start slowly and lost from running devices

I have a problem with my AVD in android Studio. After I click the run button and start a new emulator it is very slow when the android starts, the app doesn't install on it. When it is finally running and I click the run button again, I can't find the running emulator in the choose device window.
I've got a MacBook Pro, so it is running on OSX 10.10
Maybe I couldn't set up correctly the intel acceleration, but I don't think so it causes the problem. Running emulator is not found. Sometimes it works, but most of the time it doesn't/
I don't use android studio (prefer eclipse) but maybe you can use a genymotion http://www.genymotion.com/ It's free for non commercial use. It's much more faster in eclipse than normal eclipse emulator. In my opinion it acts like real phone when eclipse symulator is always slow especially with hight resolution screen.
I 've already installed HAXM but It isn't better. I try to do it again. I followed the steps. I typed the terminal steps,but I had some problem.
After this command:
kextstat | grep intel
(got this message )
147 0 0xffffff7f82b0b000 0x14000 0x14000 com.intel.kext.intelhaxm (1.1.1) <7 5 4 3 1>
After that:
sudo kextload –b com.intel.kext.intelhaxm
(but I've got that)
/Users/mecseidani/–b failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
/Users/mecseidani/com.intel.kext.intelhaxm failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
Can be it a problem!?

using telnet crashes android emulator

This question has been asked before, but none of the answers have worked for me.
I am attempting to use telnet to manipulate the state of an android virtual device, but every time i attempt any command other than help, the emulator crashes. This is happening both in windows and linux. I have to assume its a problem with the emulator but I have no idea how to solve it.
I had the same issue and it was solved using the following steps:
1- Close the emulator if it is opened
2- Navigate to the following path:
C:\Users{yourUserName}.android\avd{yourAVDName}.avd
3- Change the format of the Config.ini file instead of having it as a single line, it should look like this:
hw.ramSize=343
hw.device.manufacturer=Google
hw.sdCard=yes
hw.mainKeys=yes
hw.accelerometer=yes
skin.name=480x800
4- Make sure that the line hw.battery=YES
5- Start the emulator again
Telnet commands should now work fine.
You can check the following posts:
Android Emulator got discharged completely - running telnet power command crashing the Emulator
and
Segmentation Fault trying to set battery level in android emulator

Cordova run android is taking forever to install app on device

Ok, I have created and run various Cordova apps in the past, but since the last 2 weeks I have more and more issues with getting any app to install on my device. I have an LGE975 (LG Optimus G) phone, and there are already 5 Cordova apps installed on it.
Sometimes if I just try it 20 times it will work. Today however I have tried to run apps I don't know how many times, but they just won't install, and no error is thrown.
What I've tried so far:
Reinstalling Cordova
Upgrading cordova from 3.1.0-0.1.0 to -0.2.0
Downgrading back to -0.1.0
Rebooting device
Rebooting pc
Running app on platform "android" via command "cmd" /c C:\CordovaProjects\HelloW
orld\platforms\android\cordova\run --device
Buildfile: C:\CordovaProjects\HelloWorld\platforms\android\build.xml
What is it doing during the installation on device? The verbose output of Cordova isn't showing much of where it could go wrong. Also no error is thrown.
Is there anything I can do to fix this?
As suggested in the comment aboive i just runned:
platforms\android\cordova\run --device
and it worked!
It must be a bug or something.
I had the same problem, but it worked when I launched the process from an Administrator command prompt.
(On windows 7, Start -> Search Programs and Files -> type "cmd" -> Right-click on CMD -> Run as Administrator -> run phonegap command)
This is sort of a 'duh' answer, but maybe its an android version update that was applied to your device (phone) and the OS is now slowing things down?
Or, maybe your device is really full on storage space, and you should free up some space to speed things up :)

OSX: Android Emulator Crashes

I've just reinstalled eclipse indigo (32bit) and the latest Android SDK. The Android Emulator crashes immediately after it is launched.
Here are my steps:
Create a new Adroid project. Target is Android 4.0, SDK 14.
Press the Run button in Eclipse.
See the Emulator launch and crash about 2 seconds later
Output of crash window:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
The Eclipse console complains about the following:
Warning once: This application, or a library it uses, is using NSQuickDrawView,
which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
goldfish_fb_load: framebuffer dimensions mismatch
savevm: unable to load section goldfish_fb
emulator-5554 disconnected!
Cancelling 'com.sparky1.HelloAnrdroidActivity activity launch'!
Any thoughts about how to get emulator to behave?
This has already been reported as a Bug: http://code.google.com/p/android/issues/detail?id=724
There are some workarounds presented in this post, too. But at this point, there seams to be no actual fix.
It looks like this happens when an external monitor is connected. Try disconnecting your external monitor and then start emulator. You can attach it back after the emulator starts.
I've seen this problem too. I've found that running emulator from command line and disabling snapshots help a lot.
I'm running:
$ emulator -no-snapshot-load #avd
If disable snapshot when create device, ok. Do not enable snapshot.
If enable snapshot, it's ok to check "save to snapshot" when launch device.
But check "launch from snapshot" is not ok. If already save snapshot, it will cause emulator-arm crash.
After emulator-arm crash by "launch from snapshot", disable snapshot with AVD manager does not work. But run config > target > additional command line option(-no-snapshot-load) works.
I had all these crashes as well and found this in my crash logs:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x97585bc1 CFStringGetLength + 17
1 com.apple.CoreFoundation 0x9759df63 CFStringCompareWithOptionsAndLocale + 35
2 com.apple.CoreFoundation 0x9759df2c CFStringCompare + 60
3 com.b-l-a-c-k-o-p.CamCamX5 0x03ff3b44 CoreBundleyes::IsMainMember() const + 48
4 com.b-l-a-c-k-o-p.CamCamX5 0x03ff11cc QVDigBaseClass::ClassFactory(ComponentInstanceRecord*) + 50
5 com.b-l-a-c-k-o-p.CamCamX5 0x03ff317b QVDIG_DATA_Open + 23
After spending only a couple of hours :-( on the net I found a tip to remove
/Library/Quicktime/CamCamX5.component
After that no more crashes :-)
An alternative is to switch to using AndroVM in Virtual Box which is an X86 Android image. The big advantage is that it is lightning fast compared to the ARM one. It boots in 2-3 secs. The downside is that you have to manually do the ADB connection and the capturing of the mouse by virtual box is a pain. Not all applications will run on the x86 as well.
To use it you have to configure the first Ethernet adapter as Host Only, run the androVM configuration utility to get the emulator's IP address, then use adb connect ip-address
Another tip is that if the screen times out you need to hit F1 to wake it up.

Categories

Resources