You are not logged in.

#1 2013-08-10 21:04:44

th0th
Member
From: Turkey
Registered: 2011-03-19
Posts: 22

Using local android-sdk and android-sdk-platform-tools with phonegap

Hello,

I've installed android-sdk, android-sdk-platform-tools and android-sdk-build-tools packages from AUR and phonegap with npm command line utility of nodejs. When I try to build android app using the command:

$ phonegap run android

phonegap fails to detect locally installed android SDK environment and uses remote one:

[phonegap] detecting Android SDK environment...
[phonegap] using the remote environment

I tried adding paths /opt/android-sdk/tools/, /opt/android-sdk/platform-tools/ and /opt/android-sdk/build-tools to $PATH variable but still, no luck. How can I make phonegap use the local android SDK environment?

Last edited by th0th (2013-08-10 21:06:29)

Offline

#2 2013-09-04 17:37:07

vkill
Member
Registered: 2013-09-04
Posts: 3

Re: Using local android-sdk and android-sdk-platform-tools with phonegap

hi, you can try run `phonegap local run android`

if you see "ant: command not found" error, please install 'apache-ant'


╭─root@vkill /opt/workspace/my-app ‹ruby-1.9.3›
╰─➤  phonegap local run android                                             8 ↵
[phonegap] adding the Android platform...
   [error] Please install Android target 17 (the Android 4.2 SDK). Make sure you have the latest Android tools installed as well. Run `android` from your command-line to install/update any missing SDKs or tools.

╭─root@vkill /opt/workspace/my-app ‹ruby-1.9.3›
╰─➤  phonegap local run android
[phonegap] adding the Android platform...
   [error] An error occured during creation of android sub-project. /root/.cordova/lib/android/cordova/3.0.0/bin/create: line 104: ant: command not found
An unexpected error occurred: ant jar > /dev/null exited with 127
Deleting project...

╭─root@vkill /opt/workspace/my-app ‹ruby-1.9.3›
╰─➤  yaourt -S apache-ant
                                                                                                                                       1 ↵
╭─root@vkill /opt/workspace/my-app ‹ruby-1.9.3›
╰─➤  phonegap local run android                                                                                                                  1 ↵
[phonegap] adding the Android platform...
[phonegap] compiling Android...
[phonegap] successfully compiled Android app
[phonegap] trying to install app onto device
[phonegap] no device was found
[phonegap] trying to install app onto emulator
[phonegap] successfully installed onto emulator

Last edited by vkill (2013-09-04 17:48:44)

Offline

Board footer

Powered by FluxBB