16

I have created a certificate file using keytool command line. then i have updated ant.properties file ( under res -> native -> android) by adding the information i have set in the certificate file.

also, i have copied the certificate file in the same folder of ant.properties.

I followed the steps as mentioned in MSDN here:

https://msdn.microsoft.com/en-us/library/Dn757048.aspx

When i build in release mode in Visual Studio 2015, i don't see a release apk generated in the solution folder or inside the bin.

any help is appreciate it.

Mostafa
  • 3,296
  • 2
  • 26
  • 43

2 Answers2

37

To generate the release apk file in Visual studio, follow these steps:

1) Select Release build option.

2) Select Android from the solution platform options.

3) Select Device "This is a must step".

enter image description here

4) Right click on your project and Build the cordova app.

5) Check out Release folder in (ProjectFolder/bin/Android).

6) you will find your release apk file.

Mostafa
  • 3,296
  • 2
  • 26
  • 43
0

If you build in command line with devenv.exe /build, you must have done this one time in order to work fine. If you don't want to launch VS, you can add this line in your projectCordova.jsproj.user file

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Android'">
        <DebuggerFlavor>AndroidEmulator</DebuggerFlavor>
        <AndroidEmulatorID>AndroidDevice;Device</AndroidEmulatorID>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Android'">
        <DebuggerFlavor>AndroidEmulator</DebuggerFlavor>
        <AndroidEmulatorID>AndroidDevice;Device</AndroidEmulatorID>
    </PropertyGroup>
</Project>
watoli
  • 1