0

I am just starting my adventure with mobile app development (and with ionic). I try to emulate a sample ionic project which I created with ionic start blank. Running

ionic emulate android 

returns the following error:

Running command: /home/ja/Projects/test/hooks/after_prepare/010_add_platform_class.js /home/ja/Projects/test
add to body class: platform-android
Running command: /home/ja/Projects/test/platforms/android/cordova/run --emulator
ANDROID_HOME=/home/ja/android-sdk-linux/
JAVA_HOME=/usr/local/java/jdk1.8.0_65
WARNING : no emulator specified, defaulting to MyAndroid-5.1.1
Waiting for emulator...
emulator: UpdateChecker: skipped version check
Booting up emulator (this may take a while)....................................................


/home/ja/Projects/test/platforms/android/cordova/node_modules/q/q.js:126 
    throw e;
          ^
Error executing "adb -s emulator-5554 shell getprop init.svc.bootanim": error: device 'emulator-5554' not found
Error: /home/ja/Projects/test/platforms/android/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

Could you please help?

Thanks in advance

EDIT

My .bashrc contains the following:

export ANDROID_SDK=/home/ja/android-sdk-linux/
export ANDROID_NDK=/home/ja/android-sdk-linux/
export ANDROID_HOME="$ANDROID_SDK"
export ANDROID_PLATFORM_TOOLS="$ANDROID_SDK/platform-tools"
export ANDROID_TOOLS="$ANDROID_HOME/tools"

export PATH=${PATH}:$ANDROID_SDK:$ANDROID_NDK:$ANDROID_HOME:$ANDROID_PLATFORM_TOOLS:$ANDROID_TOOLS

export ANDROID_EMULATOR_FORCE_32BIT=true 
ramaki
  • 1
  • 2

2 Answers2

0

Seems like the 'emulator-5554' device can't be found.

Try to reset the adb server.

adb kill-server
adb start-server

There are some issues which can be solved by this one. Source: Stack Overflow answer on a related question.

Community
  • 1
  • 1
MHX
  • 1,581
  • 2
  • 21
  • 31
0

According to your logs:

Error executing "adb -s emulator-5554 shell getprop init.svc.bootanim": error: device 'emulator-5554' not found

It means you haven't created emulator. It might happen you have created then try to create one more emulator and then try emulate command.

Rahul
  • 334
  • 1
  • 8