Meteor: ANDROID_HOME is not installed, even if it is installed

OS: Ubuntu 14.04 Frame: Meteor 1.1.0.2 Application name: Songofy

Here is the output of meteor install-sdk android

  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 

I cd to directory using

 cd Desktop/songofy 

Then I type sudo add-platform android and it asks me to accept 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. 

I am adding 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 Cordoba and Meteor?

+6
source share
2 answers

I get it. This is a matter of resolution. Since android is installed as a user and an environment variable is set for the user, sudo cannot access the variables.

So what i did

 sudo -E su 

I use this to transfer environment variables for the root user. I run meteor , it installs meteor for root. run meteor install-sdk android , it will also install sdk for root, then run sudo add-platform android . Now Root has both a meteorite and android sdk, so the application works.

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

+3
source

I had the same environmental problem:

  • Meteor 1.5
  • Android SDK 26 Tools
  • $ANDROID_HOME configured correctly

Here is how I fixed it:

0
source

Source: https://habr.com/ru/post/989265/


All Articles