且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

离子 android 构建错误 - 无法找到“ANDROID_HOME"环境变量

更新时间:2021-09-23 21:36:39

Android Home 应该是 SDK 的根文件夹.

Android Home should be the root folder of SDK.

export ANDROID_HOME="$HOME/android-sdk-linux"

EDIT:打开终端并输入这些命令.(是的,在终端上,不在 bashrc 文件中)

EDIT: Open terminal and type these commands. (yes, on a ternimal , not in bashrc file)

export ANDROID_HOME=~/android-sdk-macosx
PATH=$PATH:$ANDROID_HOME/tools
PATH=$PATH:$ANDROID_HOME/platform-tools    

然后在同一个终端中输入 android.如果已配置,您将能够从该终端使用构建命令.(这是一个临时解决方案)

and then in the same terminal just type android. If configured you would be able to use build commands from this terminal. (it's a temporary solution)