错误:错误:无法找到'ANDROID_HOME'环境变量 [英] ERROR: Error: Failed to find 'ANDROID_HOME' environment variable

查看:176
本文介绍了错误:错误:无法找到'ANDROID_HOME'环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案:


  1. 删除平台离子平台rm android

  2. 更改权限 chmod 777 /path/to/update-notifier-cordova.json

  3. 添加平台与离子平台添加android

  1. Remove platform with ionic platform rm android
  2. change permission chmod 777 /path/to/update-notifier-cordova.json
  3. add platform with ionic platform add android

这可能是由于我创建的另一个项目会导致权限更改。我认为转换权限(参见步骤2)应该足够了。

It's probably due to another project I created that would cause the permission change. I think chaning the permission (see step #2) should be enough.

原帖:
当运行离子运行android 我收到此错误消息:

Original post: When running ionic run android I got this error message:


错误:错误:无法找到'ANDROID_HOME'环境变量。尝试
设置手动设置。无法在
'PATH'中找到'android'命令。尝试更新PATH以包含有效SDK目录的路径。

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.

我在bashrc文件中设置环境变量:

I set the environment variable in the bashrc file:

export ANDROID_HOME=/home/think/dev/android-sdk-linux
export PATH=$PATH:/home/think/dev/android-sdk-linux/tools

过去几个小时以前工作了,我可以不记得要改变设置中的任何东西。 :/

It used to work a few hours before and I can't remember to change anything in the settings or whatever. :/

我再次安装了npm,cordova,inonic,但我仍然遇到此错误。

I installed npm, cordova, inonic again, but I still got this error.

我'使用ubuntu 14.04

I'm using ubuntu 14.04

推荐答案

〜/ .profile 如果是由于,你家中有〜/ .bash_profile 〜/ .bash_login 〜/ .profile 被忽略,〜/ .bashrc 未被采购。

~/.profile is ignored if if there's ~/.bash_profile or ~/.bash_login in your home, as a result of ~/.profile being ignored, ~/.bashrc isn't sourced.

检查〜/ .bash_profile 〜/ .bash_login 出现在您的家中,并带一个新的终端,将帮助您。

Check for either ~/.bash_profile or ~/.bash_login present in your home, and take a new terminal, will help you.

这篇关于错误:错误:无法找到'ANDROID_HOME'环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆