简体   繁体   English

离子模拟器上的错误

[英]Error on ionic emulate android

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: 我的.bashrc包含以下内容:

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 

Seems like the 'emulator-5554' device can't be found. 似乎找不到'emulator-5554'设备。

Try to reset the adb server. 尝试重置adb服务器。

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. 资料来源: 一个相关问题的堆栈溢出答案。

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. 您可能已经创建了它,然后尝试创建另一个模拟器,然后尝试emulate命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM