错误模拟android离子框架

时间:2015-09-07 06:50:48

标签: java android ionic-framework ionic

我正在使用ionic创建一个应用程序,但我无法在android中模拟它以正确查看其功能。 运行命令进行模拟时出现错误 我使用的是Ubuntu 4.14 Linux操作系统     sandim @ Inspiron-5448:〜/ projects / soucgApp $ sudo ionic emulate 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)

有谁知道如何解决这个问题?

1 个答案:

答案 0 :(得分:0)