Android Ionic错误:可能没有生成此项目所需的环境或操作系统

Android Ionic错误:可能没有生成此项目所需的环境或操作系统,android,compiler-errors,ionic-framework,ionic,Android,Compiler Errors,Ionic Framework,Ionic,我在Ubuntu上运行爱奥尼亚。我已经安装了Android sdk,并且已经安装了使用它的工具 当我尝试运行ionic build android时,出现了以下错误: Running command: /home/fernando/Dropbox/Code/Kelps/KelpsApp/platforms/android/cordova/build [Error: ANDROID_HOME is not set and "android" command not in your PATH. Y

我在Ubuntu上运行爱奥尼亚。我已经安装了Android sdk,并且已经安装了使用它的工具

当我尝试运行ionic build android时,出现了以下错误:

Running command: /home/fernando/Dropbox/Code/Kelps/KelpsApp/platforms/android/cordova/build 
[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]
ERROR building one of the platforms: Error: /home/fernando/Dropbox/Code/Kelps/KelpsApp/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /home/fernando/Dropbox/Code/Kelps/KelpsApp/platforms/android/cordova/build: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134: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)
我试着在谷歌上看这个,但有太多的信息,没有解决方案

有人已经犯了这个错误


谢谢

是的,我以前遇到过这个错误。 但在您的日志中,我们可以看到问题所在:

错误:未设置ANDROID_HOME,并且您的路径中没有ANDROID命令。您必须至少满足其中一个条件

您已安装sdk,但尚未设置其路径

对于Windows用户,请尝试以下步骤: 从以下位置打开系统环境: 控制面板->系统->高级系统设置->选择高级选项卡 点击环境变量。。。 在用户变量中。。。部分单击“新建”按钮。 然后在Variable name中键入ANDROID_HOME,在Variable Value中键入sdk文件夹的路径 好,好,好 重新启动命令行,然后使用ionic命令重试。
对于Ubuntu,我不使用这个操作系统,所以请检查这个在这篇文章中找到我的答案:


控制面板这不是windows的?我不明白你的意思?你有没有检查Ubuntu的解决方案?