构建离子应用程序时出现“错误:未找到Android SDK”

时间:2017-01-10 07:11:37

标签: android linux cordova ionic-framework

我创建了一个名为“HelloWorld”的离子项目。我可以在浏览器中运行它。试着在Android手机上运行它,当我构建时我遇到了这个问题。请帮助我。

命令我给了:ionic build android

抛出错误:

Running command: /home/infibeam/gittry3/mytest/ionic_ex/HelloWorld/hooks/after_prepare/010_add_platform_class.js /home/infibeam/gittry3/mytest/ionic_ex/HelloWorld

add to body class: platform-android

ERROR building one of the platforms: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
You may not have the required environment or OS to build this project

Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.

我在.bashrc文件中的环境变量配置如下:

export ANDROID_HOME="/home/infibeam/android-sdk-linux/docs/sdk"
export ANDROID_SDK="/home/infibeam/android-sdk-linux/docs/sdk"
export ANDROID_NDK="/home/infibeam/android-sdk-linux/docs/ndk"
export ANDROID_PLATFORM_TOOLS="$ANDROID_SDK/platform-tools"
export PATH="${PATH}:$ANDROID_HOME/tools:$ANDROID_PLATFORM_TOOLS"

所有这些路径都有效。我已经检查过了!

0 个答案:

没有答案