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

倖福魔咒の 提交于 2019-11-29 16:58:24

问题


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.


回答1:


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.




回答2:


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>


来源:https://stackoverflow.com/questions/32075824/where-is-the-release-apk-file-for-cordova-apps-in-visual-studio-2015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!