简体   繁体   English

错误模拟android ionic框架

[英]Error emulate android ionic framework

I'm creating an app with ionic, but I can not emulate it in android to see their functions properly. 我正在使用ionic创建一个应用程序,但无法在android中对其进行仿真以正确查看其功能。 Here is the error when running the command to emulate I'm using Ubuntu 4.14 Linux OS sandim@Inspiron-5448:~/projects/soucgApp$ sudo ionic emulate android 这是运行命令以模拟我正在使用Ubuntu 4.14 Linux OS sandim @ Inspiron-5448时的错误:〜/ projects / soucgApp $ sudo ionic emulation android

Running command: /home/sandim/projects/soucgApp/hooks/after_prepare/010_add_platform_class.js /home/sandim/projects/soucgApp
add to body class: platform-android
Running command: /home/sandim/projects/soucgApp/platforms/android/cordova/run --emulator
ERROR: Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
Error: /home/sandim/projects/soucgApp/platforms/android/cordova/run: Command failed with exit code 2
    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)

does anyone know how to fix this? 有谁知道如何解决这一问题?

you have to set the variable environment, check the link below 您必须设置变量环境,请查看下面的链接

https://askubuntu.com/questions/266758/how-to-set-up-environment-variable-properly https://askubuntu.com/questions/266758/how-to-set-up-environment-variable-properly

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

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