Marius Bancila
Marius Bancila

Reputation: 16328

Cordova project build with Visual Studio uses default name CordovaApp

I'm developing a project with Visual Studio Tools for Apache Cordova CTP 3.1. I have set a name for the project, but the resulting .apk for Android is called CordovaApp-release.apk (or debug, depending on the configuration).

I understand this is a problem with some Cordova versions (see Android build keeps using CordovaApp as app name) and I have seen that the solution for that is to edit three files: AndroidManifest.xml, build.xml and CordovaApp.java and replace CordovaApp with the actual app name (see Renaming Android build .apk from CordovaApp to your App name).

However, the problem is that when using the VS Tools for Cordova these files are created during the build, so the approach to manually edit them is not an option.

I was wondering if there is something I can put in config.xml that can make Cordova use the name of the project as defined in the name element of widget.

Notes:

I know I can place a custom AndroidManifest.xml file in the res/native/android and have the name correct in this file, but the problem still remains with the other two.

I also know that the name of the .apk is not important, but I'd like it to have the name of the product without needing to run post-build commands to rename it.

Upvotes: 1

Views: 866

Answers (1)

mharr
mharr

Reputation: 604

The app name in the config.xml is used for the app name in the package and the store. The file name of the apk is trivial, and does not make any visible difference to the store or your users. Personally, I rename the CordovaApp.apk file name to ...apk, just to keep versions straight between what I install directly on attached devices and in app store beta versions.

Remember also that Visual Studio Cordova tools are still beta. Perhaps they will provide a way to name package files in a final version.

Upvotes: 1

Related Questions