Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap 3.0.0 + Android always wants to use remote environment

Tags:

cordova

phonegap build ios

works correct; it adds iOS to the platforms, but

phonegap build android

always wants me to sign in:

iMAc:myFirstApp2 $ phonegap build android
[phonegap] detecting Android SDK environment...
[phonegap] using the remote environment
[phonegap] PhoneGap/Build Login
[phonegap] Sign up at build.phonegap.com
 [warning] GitHub accounts are unsupported
  [prompt] enter username:    [error] canceled

in the documentation for 3.0.0 (http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html) it seems as if it's possible to use the local environment as well. I already set the paths correctly:

/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/haemi/libs/sdk/platform-tools/:/Users/haemi/libs/sdk/tools

How do I make sure it's using the local environment rather than a remote environment?

like image 535
swalkner Avatar asked Aug 16 '13 13:08

swalkner


2 Answers

You can use:

phonegap local build android

To force it to run using the local environment.

What version of the Android SDK do you have installed? I don't think it works with version 18. I had the same problem and had to install version 17.

like image 124
Megacan Avatar answered Oct 23 '22 14:10

Megacan


I overcame the above mentioned situation but my phonegap application doesn't get installed on the emulator though it gives "successfully installed onto device message". To run the app locally issue following command from the subfolder of the project:

phonegap local run android

before running this command make sure you have java_home set and included in path variable, location of ant.bat in the path variable and the location of javac(inside the jdk\bin) in the path variable. With these things i was able to get successfully compiled message.

EDIT : though the application isn't automatically installed in the device , the files corresponding to the project ".java" files "res" folder and all the essential files got created inside the project folder

like image 38
vinayhudli Avatar answered Oct 23 '22 14:10

vinayhudli