Ionic android emulator crashes on launch?

#1

Everything seemed to be fine when I was first writing my Ionic app, emulator worked. Now when I run things after updating to the latest Ionic this is what i get.

created a fresh project (super) and get same results as my dev project. both of them dump to console and the emulator never runs. I get a mem dump. Any ideas? tried removing android platform and readding it, also on a fresh project same results so not sure if theres something else I can do?

No emulator specified, defaulting to Nexus_5X_API_24
Waiting for emulator to start...
emulator: Requested console port 5584: Inferring adb port 5585.
Hax is enabled
Hax ram_size 0x60000000
HAX is working and emulator runs in fast virt mode.
emulator: emulator window was out of view and was recentered

VCPU shutdown request
EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000663
ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
EIP=0000fff0 EFL=00010002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0000 00000000 0000ffff 00009300
CS =f000 ffff0000 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =0000 00000000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT=     00000000 0000ffff
IDT=     00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000 
DR6=ffff0ff0 DR7=00000400
EFER=0000000000000000

#2

I would reinstall the emulator in Android Studio. Something is borked.

#3

no dice. complete removal of android studio and devices and readded, same issue. seems like someone else has this same issue on StackOverflow but nobody has replied. Tried removing android device, readding the device, on both my project and a new (super) project. Also tried removing android studio and readding it, which i had to redownload SDK’s and other devices and setup a new virtual device. once that all gets going its the same problem where the device just dumps memory to the console and i get a black screen and no boot.

genymotion works but its dogslow, will keep trying to find a solution, any other advice?

#4

getting closer. I installed the latest emulator from android studio with the latest SDK and it does boot but ionic still is angry now about the error below. at least im closer.

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
Error: Cannot read property ‘replace’ of undefined

#5

That is more Cordova being angry :wink:

Can you run the same command you are using now without ionic in front to confirm this is a Cordova problem?

#6

I waas able to get it to work by launching the emulator first, and then running the ionic command, it loads in and runs. (found that solution from another forum) Some bug saying to edit the cordova android node package and replace a regex that loads v26

#7

Oh yeah, that one. Cordova is having a hard time with all the changes in iOS and Android for emulator names and how they are returned etc.