流星:ANDROID_HOME未设置,即使它被设置 [英] Meteor: ANDROID_HOME is not set even though it is set

查看:375
本文介绍了流星:ANDROID_HOME未设置,即使它被设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

操作系统:Ubuntu的14.04 框架:流星1.1.0.2 应用程序名称:Songofy

OS : Ubuntu 14.04 Framework: Meteor 1.1.0.2 Application Name: Songofy

下面的流星安装-SDK的Andr​​oid的输出

 meteor install-sdk android
✓ Found Android bundle
✓ A JDK is installed                          
✓ Found Android Platform tools                
✓ Found Android Build Tools                   
✓ Found Android 19 API                        
✓ Found suitable Android x86 image            
✓ 'meteor' android virtual device (AVD) found 
✗ Android emulator acceleration is not installed
  (The Android emulator will be very slow without acceleration)
Platform requirements not yet met             
Please follow the instructions here:          
https://github.com/meteor/meteor/wiki/Mobile-Dev-Install:-Android-on-Linux#haxm

我cd进入目录使用

I cd into the Directory using

cd Desktop/songofy

然后,我键入 sudo的附加平台的android ,并要求我先接受eprmission再出现这种情况:

Then I type sudo add-platform android, and it asks me to accept the eprmission and then this happens:

`You must agree to the terms to proceed.       

Do you agree (Y/n)? Y

/home/abhishek/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
                        throw(ex);
                              ^
Error: Error running /home/abhishek/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh

/home/abhishek/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:126
                    throw e;
                          ^
Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.

我用这种添加ANDROID_HOME变量。

I add the ANDROID_HOME variable using this.

 abhishek@TiltedLines:~/Desktop/songofy$ export ANDROID_HOME=~/.meteor/android_bundle/android-sdk
 abhishek@TiltedLines:~/Desktop/songofy$ export PATH=$ANDROID_HOME/tools:$PATH
 abhishek@TiltedLines:~/Desktop/songofy$ export PATH=$ANDROID_HOME/platform-tools:$PATH

什么是科尔多瓦和流星的问题?

What is the problem with Cordova and Meteor?

推荐答案

我想它了。这是一个权限问题。因为机器人安装为使用者和环境变量分别为用户设置,须藤不能访问的变量。

I figured it out. It was a permission issue. Because the android is installed as a user and the environment variable were set for the user, sudo cannot access the variables.

所以,我所做的是

sudo -E su

我用这来传输的环境变量root用户。我跑流星它安装流星根。做一个流星安装-SDK机器人它安装在 SDK 根为好,然后运行 sudo的附加平台的android 。根既有流星,现在Android SDK的,所以应用程序运行。

I am using this to transfer the environment variables for root user. I run meteor it installs meteor for root. do a meteor install-sdk android it installs the sdk for root as well, then run sudo add-platform android. Root has both meteor and the android sdk now, so the app runs.

希望这有助于。浪费了很多时间在这。

Hope this helps. Wasted a lot of time on this.

这篇关于流星:ANDROID_HOME未设置,即使它被设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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