Building a phonegap app from the cli

45 views
Skip to first unread message

Doc Jump

unread,
Dec 10, 2015, 9:08:25 PM12/10/15
to phonegap
Hello. I using all the tutorials I can find to create my first phonegap androidd apk file. I am using the default phonegap app created by "phonegap create test com.cyberwurks.test Test. I am using phonegap version 5.3.9 on windows xp pro. To the best of my knowledge, I have all the required software packages, environment variables and paths installed. My problem comed when I execute phonegap build android  . 
The results are as follows:
executing "cordova platform add --save android"
completed "cordova platofrm add --save android"
executing "cordova  build android"
completed "cordova build android"

Appears to complete successfully. The only problem is no apk file is created. I also tried substituting "target" for "build" and the addition of the parameter "-device= xxxxxxxxxx". Neither made a difference. Of course, I have my SGS6 edge connected to my PC when performing the above. I assumed this may be a setup error but I have checked and double checked all.

Any help will be appreciated

Steve Husting

unread,
Dec 11, 2015, 10:31:22 AM12/11/15
to phonegap
I think that the output tells you where it created the apk. Are you saying the folder is present and the apk is not inside? Just wondering if you are looking in the wrong place.

Doc Jump

unread,
Dec 11, 2015, 5:07:27 PM12/11/15
to phonegap
Yeah. The project folder was created when the project was created,  but after the build, there is no apk anywhere. Well...almost. I found three apk's that were created by me based on the date, but they were located in strange places and not with the project name I used. I tried three times with projects test1, test2 and test3. The apk's were:
c:\android\sdk\samples\android-22\le3gacy\ApiDemos\assets\HelloActivity.apk
c:\android\sdk\samples\android-19\legacey\ApiDemos\assets\HelloActivity.apk
c:\Documents and Settings\user\.Android Studio1.5\system\compile-server\test1-c59e971d\android\intermediate-artifacts\android.

I did also try the Android Studio so maybe that is were the last one was created. I guess I need to clear all these and see if another apk is created if I follow the CLI procedure again. 

On Thursday, December 10, 2015 at 6:08:25 PM UTC-8, Doc Jump wrote:

Doc Jump

unread,
Dec 11, 2015, 8:28:30 PM12/11/15
to phonegap
In fact, the makeatrail.com phonegap/android tutorial indicates that once the build command is entered via cli, after a couple of seconds the app should appear on the android phone connected to the pc and if none is connected, it will revert to an emulator. I see none of this.


On Thursday, December 10, 2015 at 6:08:25 PM UTC-8, Doc Jump wrote:

jcesarmobile

unread,
Dec 12, 2015, 6:43:52 AM12/12/15
to phonegap
It's hard to tell you what are you doing wrong if you don't tell what are you doing, do you expect us to search all the tutorials on makeatrail.com until we find the one you used?

Steve Husting

unread,
Dec 14, 2015, 10:39:20 AM12/14/15
to phonegap
Reply all
Reply to author
Forward
0 new messages