How to compile cordova project from visual studio (Hybrid App) to android / ios apk
Asked Answered
E

2

8

I try to compile my Cordova Hybrid App from visual studio to apk file

  1. After I deploy the project to Android / iOS the project bin folder still empty.
  2. I try to upload the "www" folder to build.phonegap.com but I get error.
  3. What is the best and correct way to compile the project (HTML, CSS, and JS) to APK for Android and IOS?

Thanks, Tom

Update:

I try to build from the visual studio

this is my Project folder enter image description here

When I try to build project from the visual studio on "Device" mode I get this error

enter image description here

Expulsion answered 19/6, 2014 at 11:36 Comment(0)
N
19

1- If you have used Ripple simulator as the target, nothing will be generated in the bin folder. You need to switch the build configuration to "device" in order for the binaries to be generated

2 - The www folder that is generated by the Visual Studio template has nothing special and you shouldn't have issues with PhoneGap Build. If you have errors they are coming from your JS code itself

3 - To build the binaries for Android using the Multi-Device Hybrid extension for Visual Studio, you should be good by simply switching the build configuration to "device" instead of Ripple simulator. For iOS you need to use the Remote Build and Simulation Agent for iOS (which require have a Mac as the iOS tools are NOT available for Windows and you cannot generate the iOS binary directly on your Windows machine. Otherwise, you can consider using PhoneGap Build service

Narceine answered 19/6, 2014 at 16:14 Comment(2)
thanx, apk generated at "solution path"\bld\Debug\platforms\android\ant-buildKazachok
Don't distribute debug builds.Sherasherar
G
0

From the image the error looks to be similar to the one I was getting about my device not being recognized/found.

This answer explains how to get the APK directly just by setting the solution to Release, and only Building the project rather trying to do a full deploy to a device. It pretty much is the same answer as mentioned in point 3 above, just tested on a PhoneGap App solution.

Goral answered 4/1, 2016 at 21:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.