cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jcesarmobile (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CB-13932) APK Not Copied to Visual Studio bin Directory
Date Mon, 05 Mar 2018 11:15:00 GMT

     [ https://issues.apache.org/jira/browse/CB-13932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

jcesarmobile closed CB-13932.
-----------------------------
    Resolution: Won't Fix

cordova-android version had a major bump because of this breaking change (project structure
changed to be in line with latest Android Studio native structure), so tools using it should
adapt to the change.
So closing as won't fix. 
As workaround use the script provided in one of the comments.

> APK Not Copied to Visual Studio bin Directory
> ---------------------------------------------
>
>                 Key: CB-13932
>                 URL: https://issues.apache.org/jira/browse/CB-13932
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-android
>    Affects Versions: cordova-android-7.0.0
>         Environment: cordova@8.0
> cordova-android@7.1.0
> Visual Studio 2017
> Windows 10
>            Reporter: Terence Bandoian
>            Assignee: Joe Bowser
>            Priority: Minor
>
> With Visual Studio 2017 configured to use the globally installed Cordova CLI (8.0) instead
of the version packaged with Visual Studio, debug APKs generated with cordova-android@7.1.0
are not copied to the project bin directory.
> Debug APKs are written to: 
> {code:java}
> platforms/android/app/build/outputs/apk/debug/app-debug.apk
> {code}
> Visual Studio apparently expects APKs to be written to:
> {code:java}
> bin/Android/Debug/android-debug.apk{code}
> This prevents initiatiation of a debug session on a device from within Visual Studio.
> A simple after_build script such as the following: 
> {code:java}
> module.exports = function (ctx) {
>     if (ctx.opts.platforms.indexOf('android') < 0) {
>         return;
>     }
>     var fs = ctx.requireCordovaModule('fs'),
>         path = ctx.requireCordovaModule('path');
>     var src = path.join(
>         ctx.opts.projectRoot,
>         'platforms/android/app/build/outputs/apk/debug/app-debug.apk');
>     var dst = path.join(
>         ctx.opts.projectRoot,
>         'bin/Android/Debug/android-debug.apk');
>     fs.copyFileSync(src, dst);
>     return 0;
> };
> {code}
> is an effective work-around but the development experience would be improved if it wasn't
necessary to expend the extra effort to determine the cause and implement a solution.
> The most recent version of cordova-android that I know of where this is not necessary
is 6.3.0.  I haven't tested 6.4.0 or 7.0.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message