[ 
https://issues.apache.org/jira/browse/CB-13932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16382250#comment-16382250
 ] 

Jan Piotrowski (Sujan) edited comment on CB-13932 at 3/1/18 4:27 PM:
---------------------------------------------------------------------

I would suggest Visual Studio should update their integration - latest when 
they also upgrade to a more recent packaged Cordova CLI. (That's why I asked if 
that code was publicly available - then someone could even send a Pull Request 
with the changes.)

Afaik the location where builds are put is not really defined by Cordova, but 
by the native tooling being used. One can probably override it, but that is not 
something one wants to do as it just adds more code.

But: Maybe this is all different here, and someone that actually works on 
cordova-android can tell you more about it. I am just an interested bystander ;)


was (Author: sujan12):
I would suggest Visual Studio should update their integration. 
Afaik the location where builds are put is not really defined by Cordova, but 
by the native tooling being used. One can probably override it, but that is not 
something one wants to do as it just adds more code.

But: Maybe this is all different here, and someone that actually works on 
cordova-android can tell you more about it. I am just an interested bystander ;)

> 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: [email protected]
> [email protected]
> 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 [email protected] 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to