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

11,684

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

Share:
11,684
user3489892
Author by

user3489892

Updated on June 19, 2022

Comments

  • user3489892
    user3489892 about 2 years

    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

  • SalmanShariati
    SalmanShariati almost 10 years
    thanx, apk generated at "solution path"\bld\Debug\platforms\android\ant-build
  • Ashley
    Ashley over 9 years
    Don't distribute debug builds.