More on apk not being created by "cordova build android"

6 views
Skip to first unread message

Doc Jump

unread,
Aug 10, 2017, 3:23:33 PM8/10/17
to phonegap
I wrote earlier about this issue but thought a new post was best since I am now experiencing this problem semi-regularly. This issue is that using "cordova build android" in cli appears to build correctly no errors. However, from one minute to the next, no apk file is being created. Many other phonegap users must be experiencing the same thing. I am using win 10, android 6.2.2, cordova 6.5.0 and npm 3.10.10.
However, I have found what seems to be an effective workaround. I use the following steps:

1. Remove the current android version ("cordova platform rm android").
2. Add android 6.1.2 ("cordova platform add and...@6.1.2). - this version yields an error "cannot find gradle" on a build attempt
3. Remove android 6.1.2
4. Re-install android 6.2.2
Then the cli will again create a valid apk file. Sounds silly I know, but so far it is working.

Still, the question remains, why does cordova seemingly at will, stop creating an apk from a cli build?

jcesarmobile

unread,
Aug 10, 2017, 8:13:15 PM8/10/17
to phonegap
Try using CLI 7.0.1
Reply all
Reply to author
Forward
0 new messages