Reputation: 2381
I'm trying to add the android platform to my phonegap project. I've added already the iOS platform which worked without any problems. When trying to add android via command
phonegap local run android
I'm always getting this error:
[error] The command `android` failed. Make sure you have the latest Android SDK installed, and the `android` command (inside the tools/ folder) added to your path.
I have already downloaded the latest Android SDK and I set a PATH to the tools and platform-tools folder as well.
export PATH=${PATH}:/Documents/android/sdk/platform-tools:/Documents/android/sdk/tools
I also updated my bash_profile file properly with
source ~/.bash_profile
Upvotes: 0
Views: 1002
Reputation: 2381
It turned out that the path to the Android SDK have to be absolute path. After changing my path to something like
export PATH=${PATH}:/Users/your-username/Documents/android/sdk/platform-tools:/Users/your-username/Documents/android/sdk/tools
I could now successfully add the android platform to my project.
Upvotes: 1