10
votes

I've got a feeling I upgraded to Visual Studio 2015 RTM too early. Visual Studio Emulator for Android would no longer launch, claiming that the pre-release version had expired.

I ran the RTM installer, allowing it to replace Release Candidate components as needed. The process ran smoothly, but now after upgrading, Cordova projects will no longer deploy or debug.

With the Release Candidate, the toolbar's green Start button had a dropdown for choice of device. Now with RTM version, this button is just labelled "Start" and its dropdown provides no options for device selection. Instead, the only option in the dropdown is "Start". As I change the selection in the "Solution Platform" dropdown, located left of this Start button, the Start button still provides no choices. See images below.

Solution Platform: Android Cordova-Android

Solution Platform: Windows-AnyCPU Cordova-Windows

Solution Platform: Windows Phone 8 Cordova-WP

The Debug menu's "Start Debugging" item is disabled. If I click the Start toolbar button, I get this message: "The debugger cannot continue running the process. Unable to start debugging."

I've confirmed that Visual Studio Emulator for Android is functional. I've got the profile '5" Lollipop (5.0) XXHDPI Phone' working.

For a comparison, I've also added a new Windows Phone 8.1 project to my solution and confirmed that project allows selecting a Debug Target. In the toolbar, the word Start is replaced with "Emulator 8.1 WVGA 4 inch 512MB". With this project as the Startup Project, the Debug menu now has "Start Debugging" enabled. This project starts as expected.

C#-WP81

Since the Visual Studio Emulator for Android is functional, and Visual Studio successfully targets the Windows Phone emulator, it seems there's a misconfiguration related to Visual Studio's Cordova project type. The linkage between a VS2015 Cordova project and its "device" targets is missing.

Any ideas?

UPDATE: See also: Unable to start debugging in Visual Studio RTM for cordova app

UPDATE 2: I've made several adjustments:

  1. Tools for Apache Cordova's Dependency checker found missing Android SDK components. I've added these, satisfying Dependency Checker.

  2. Tools for Apache Cordova's Environment Variable Overrides showed no path to ADT_HOME. I've set it to "C:\Program Files (x86)\Android\android-sdk".

  3. My build output showed "[taskdef] could not load definitions from resource emma_ant.properties. it could not be found." I added a system environment variable ANT_HOME pointing to "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3", and added ";%ANT_HOME%\bin" to the PATH. Still "emma_ant.properties" message remains, but it is not up to the level of a warning or error.

With Solution Platform set to Android, my current build output is:

1>------ Rebuild All started: Project: BlankCordovaApp2, Configuration: Debug Android ------
1>  Buildfile: C:\Users\billvo\Documents\Visual Studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\build.xml
1>    [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.
1>
1>  -check-env:
1>   [checkenv] Android SDK Tools Revision 23.0.0
1>   [checkenv] Installed at C:\Program Files (x86)\Android\android-sdk
1>
1>  -setup:
1>       [echo] Project Name: MainActivity
1>    [gettype] Project Type: Application
1>
1>  -pre-clean:
1>
1>  clean:
1>  [getlibpath] Library dependencies:
1>  [getlibpath]
1>  [getlibpath] ------------------
1>  [getlibpath] Ordered libraries:
1>    [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.
1>
1>  nodeps:
1>
1>  -check-env:
1>   [checkenv] Android SDK Tools Revision 23.0.0
1>   [checkenv] Installed at C:\Program Files (x86)\Android\android-sdk
1>
1>  -setup:
1>       [echo] Project Name: MainActivity
1>    [gettype] Project Type: Android Library
1>
1>  -pre-clean:
1>
1>  clean:
1>
1>  BUILD SUCCESSFUL
1>  Total time: 0 seconds
1>  Your environment has been set up for using Node.js 0.12.2 (ia32) and npm.
1>  ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac
1>  ------ Name from source package.json: vs-tac
1>  ------ Version from source package.json: 1.0.0
1>  ------ Package not currently installed globally.
1>  ------ Installing globally from source package. This could take a few minutes...
1>  > [email protected] install C:\Users\billvo\AppData\Roaming\npm\node_modules\vs-tac\node_modules\edge
1>  > node tools/install.js
1>  Success: platform check for edge.js: node.js ia32 v0.12.2
1>  npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.2","npm":"2.7.4"})
1>  npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.2","npm":"2.7.4"})
1>  npm WARN installMany normalize-package-data was bundled with [email protected], but bundled package wasn't found in unpacked tree
1>  C:\Users\billvo\AppData\Roaming\npm\vs-tac-cli -> C:\Users\billvo\AppData\Roaming\npm\node_modules\vs-tac\vs-tac-cli.cmd
1>  [email protected] C:\Users\billvo\AppData\Roaming\npm\node_modules\vs-tac
1>  ├── [email protected]
1>  ├── [email protected]
1>  ├── [email protected]
1>  ├── [email protected]
1>  ├── [email protected]
1>  ├── [email protected]
1>  ├── [email protected] ([email protected], [email protected])
1>  ├── [email protected] ([email protected], [email protected])
1>  ├── [email protected] ([email protected], [email protected])
1>  ├── [email protected] ([email protected])
1>  ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
1>  ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
1>  ├── [email protected] ([email protected], [email protected])
1>  └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
1>  ------ npm install of [email protected] from C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac completed.
1>  ------ Installing Cordova tools [email protected] for project from npm. This could take a few minutes...
1>  npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.2","npm":"2.7.4"})
1>  npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.2","npm":"2.7.4"})
1>  npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.2","npm":"2.7.4"})
1>  npm WARN installMany normalize-package-data was bundled with [email protected], but bundled package wasn't found in unpacked tree
1>  [email protected] node_modules\cordova
1>  ├── [email protected]
1>  ├── [email protected]
1>  ├── [email protected] ([email protected])
1>  └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
1>  ------ npm install of [email protected] from npm completed.
1>  ------ Build Settings:
1>  ------ Build Settings:
1>  ------    platformConfigurationBldDir: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\bld\Android\Debug
1>  ------    platformConfigurationBinDir: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\bin\Android\Debug
1>  ------    buildCommand: prepare
1>  ------    platform: Android
1>  ------    cordovaPlatform: android
1>  ------    configuration: Debug
1>  ------    cordovaConfiguration: Debug
1>  ------    projectName: BlankCordovaApp2
1>  ------    projectSourceDir: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2
1>  ------    npmInstallDir: C:\Users\billvo\AppData\Roaming\npm
1>  ------    language: en-US
1>  ------ Platform android already exists
1>  ------ Updating plugins
1>  ------ Currently installed plugins:
1>  ------ Currently installed dependent plugins:
1>  ------ Currently configured plugins:
1>  ------ Preparing platform: android
1>  Generating config.xml from defaults for platform "android"
1>  Calling plugman.prepare for platform "android"
1>  Preparing android project
1>  Processing configuration changes for plugins.
1>  Iterating over installed plugins: []
1>  Writing out cordova_plugins.js...
1>  Wrote out Android application name to "BlankCordovaApp2"
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-land-hdpi\screen.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-land-ldpi\screen.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-land-mdpi\screen.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-land-xhdpi\screen.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-port-hdpi\screen.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-port-ldpi\screen.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-port-mdpi\screen.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-port-xhdpi\screen.png
1>  splash screens: [{"src":"res/screens/android/screen-hdpi-landscape.png","density":"land-hdpi","platform":"android"},{"src":"res/screens/android/screen-ldpi-landscape.png","density":"land-ldpi","platform":"android"},{"src":"res/screens/android/screen-mdpi-landscape.png","density":"land-mdpi","platform":"android"},{"src":"res/screens/android/screen-xhdpi-landscape.png","density":"land-xhdpi","platform":"android"},{"src":"res/screens/android/screen-hdpi-portrait.png","density":"port-hdpi","platform":"android"},{"src":"res/screens/android/screen-ldpi-portrait.png","density":"port-ldpi","platform":"android"},{"src":"res/screens/android/screen-mdpi-portrait.png","density":"port-mdpi","platform":"android"},{"src":"res/screens/android/screen-xhdpi-portrait.png","density":"port-xhdpi","platform":"android"}]
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\screens\android\screen-hdpi-landscape.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-land-hdpi\screen.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\screens\android\screen-ldpi-landscape.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-land-ldpi\screen.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\screens\android\screen-mdpi-landscape.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-land-mdpi\screen.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\screens\android\screen-xhdpi-landscape.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-land-xhdpi\screen.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\screens\android\screen-hdpi-portrait.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-port-hdpi\screen.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\screens\android\screen-ldpi-portrait.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-port-ldpi\screen.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\screens\android\screen-mdpi-portrait.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-port-mdpi\screen.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\screens\android\screen-xhdpi-portrait.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-port-xhdpi\screen.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-hdpi\icon.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-ldpi\icon.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-mdpi\icon.png
1>  deleted: C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-xhdpi\icon.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\icons\android\icon-36-ldpi.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-ldpi\icon.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\icons\android\icon-48-mdpi.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-mdpi\icon.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\icons\android\icon-72-hdpi.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-hdpi\icon.png
1>  copying image from C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\res\icons\android\icon-96-xhdpi.png to C:\Users\billvo\documents\visual studio 2015\Projects\BlankCordovaApp2\BlankCordovaApp2\platforms\android\res\drawable-xhdpi\icon.png
1>  Wrote out Android package name to "io.cordova.myapp2a20d4"
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

I'm still not able to select the target device for debugging, regardless of whether I build for Android, Windows-AnyCPU, or Windows Phone 8.

UPDATE 3: The images below show the Visual Studio 2015 components installed. I tried adding Visual C++ Mobile Development, but saw no change in Cordova, so I removed it.

Add/Remove 1

Add/Remove 2

Add/Remove 3

Add/Remove 4

UPDATE 4: When I logged into a new local user account, I'm able to debug against the Visual Studio Emulator for Android. This tells me that the problem is likely specific to my primary Windows account's profile. I could probably fix this by deleting my profile and starting fresh.

4
I'm getting the same issue, except in my case I never installed the VS2015 RC. I already had the latest VS2013 Community installed. Uninstalled 2013 as best I could, installed VS2015 community and get the same debug error for Cordova projects.Elyas

4 Answers

30
votes

Looks like a library is corrupted from the upgrade. Please give this a try:

  1. Close all VS instances
  2. cd %appdata%\Local\Microsoft\Phone Tools”
  3. rename CoreCon folder
  4. Launch VS again.

Let us know if this resolves your issue. Thanks for using VS 2015 and Tools for Apache Cordova.

Soak.

2
votes

The Answer "Subhag Oak" gave, worked for me.

Here the documentation of my research, if it does not work for any other user.

Watch the output, to get your specific cause. Increase the build-Verbosity in VS-Options.

go to Tools -> Options -> Tools for Apache Cordova, click the 'Run Dependency Checker'.

Check the installed Visual Studio features, this is selected by default:

VS for Cordova-Development

Compared to msdn:Install Tools for Cordova

Add also:

  • Emulator for Windows Phone 8.1
  • Android Native Development Kit (R10E, 32 bits)

And if you still get no emulator after compiling a blank cordova app:

no preinstalled 8.1. Emulator

I think then you have to install google chrome: msdn "The installer does not install Google Chrome, which is required if you want to run the Apache Ripple simulator for iOS and Android, and it does not install Apple iTunes, which is required for deploying an app to an iOS device connected to your Windows PC."

Also check your Hyper-V Settings:

I'm checking out the Tools\Visual Studio Emulator for Android: Activated Emulator Message

Check the SystemRequirements

Check this link: Troubleshooting the Visual Studio Emulator for Android

Or give "reinstalling node.js" a chance. Wait for "Setup Repair" again.

0
votes

The solutions above didn't work me. But after searching the net for hours, I came to this solution that worked like a charm:

If the “Tools for Universal Windows Apps Development” are still installed:

  1. Go to Programs and Features, select Visual Studio 2105, click Change.
  2. In Visual Studio setup, click Modify.
  3. Deselect the feature “Tools for Universal Windows App Development”
  4. Select “Tools for Universal Windows App Development” again, and click Update.

Source: https://social.msdn.microsoft.com/Forums/vstudio/en-US/c9936d80-087d-4cad-93bf-ca4873889773/the-debugger-cannot-continue-running-the-process?forum=vsdebug

0
votes

@SubhagOak solution to rename CoreCon folder worked for me too, even tho a slightly different pre-deployment scenario. Could not deploy from VS2015 to Android device via USB debuging. Error notification was generated via VS pop up basiclly stating Could Not Find File but no errors were listed in VS Error Console. It only generated a pop up. Received this error after opening a new local branch of a newly cloned local GIThub repo created using VS2015 Teamwork Explorer.

This is the second time this solution has worked for me; same scenario.