2

I'm trying to get Phone-gap to work, I followed this tutorial: http://www.levibotelho.com/development/the-complete-guide-to-running-phonegap-on-ubuntu/. I am one Ubuntu 13.10. I have tried many different solutions found on stack-overflow and others, and non of them work.
The export I am using:

export ANDROID_HOME="/usr/local/android-sdk-linux/tools" export ANDROID_PLATFORM_TOOLS="/usr/local/android-sdk-linux/platform-tools" export PATH="$PATH:$ANDROID_HOME:$ANDROID_PLATFORM_TOOLS" 

The error I am getting is this:

Running command: /hdd/Fred/Documents/phonegap/helloworld/platforms/android/cordova/run --emulator ERROR: Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions. Error: /hdd/Fred/Documents/phonegap/helloworld/platforms/android/cordova/run: Command failed with exit code 2 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:756:16) at Process.ChildProcess._handle.onexit (child_process.js:823:5) 

Please help.

1
  • 1
    I guess, Andrid home should be till sdk and not tool. Commented Nov 29, 2014 at 16:38

1 Answer 1

1

@Rupesh is correct - set ANDROID_HOME to the sdk dir, not the tools dir.

So you don't have to do this each time you open a terminal, pop it into your .bashrc in your home dir:

export ANDROID_HOME="/usr/local/android-sdk-linux/" 

(As the error you get implies, if ANDROID_HOME is set, you shouldn't need to modify your PATH, but I guess it can't do any harm)

If that still doesn't work, check that the sdk path is actually correct.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.