简体   繁体   中英

Where is the release apk file for cordova apps in Visual Studio 2015

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.

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".

在此输入图像描述

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.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM