cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terence Bandoian (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-13932) APK Not Copied to Visual Studio bin Directory
Date Thu, 01 Mar 2018 13:53:00 GMT

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

Terence Bandoian commented on CB-13932:
---------------------------------------

In Visual Studio 2017, if the option to use a globally installed Cordova CLI is selected,
the build is executed externally.  Upon completion, Visual Studio uses the generated APK
to begin a debug session.  This worked with cordova@7.1.0 and cordova-android@6.3.0.  Does
that make sense?

> 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