DevMagic
DevMagic

Reputation: 1

Deploy App with Cordova Tools on Visual Studio 2015 CTP

I'm trying to deploy my simple app on Windows/WP 8.1 and Android with Cordova tools and VS2015 CTP 5.

When I'm choosing "Windows Phone (Universal)" or "Windows" I'm getting the following error:

"Value cannot be null. Parameter name: source"

When I'm choosing Microsoft "Android Emulator" for Visual Studio, I'm getting blank black adb console window.

How can I solve this problems? Thanks.

Upvotes: 0

Views: 915

Answers (3)

tsdude
tsdude

Reputation: 187

I am experiencing the same symptoms. It happens periodically and the only solution seems to be uninstalling and re-installing VS2015 CTP5. Everything works for a few hours and then when the errors occurs once, there seems to be no immediate way to fix it. (rebooting, cleaning solution, etc)

"Value cannot be null. Parameter name: source"

Upvotes: 0

John Engel-Kemnetz
John Engel-Kemnetz

Reputation: 2565

On your Android emulator question, if "Visual Studio Emulator for Android" does not appear in Add/Remove Programs, you'll need to go to Add/Remove Programs->Visual Studio 2015 CTP5, modify the installation, and add the Visual Studio Emulator for Android.

If "Visual Studio Emulator for Android" does appear in Add/Remove Programs, then the blank adb.exe window is a known issue in CTP5 that occurs sometimes when Cordova Tools and the Android Emulator are unable to communicate. To verify that this is the problem, create a new Visual C++ Android Native Activity project and attempt to run the default empty project against the emulator ("VS Emulator KitKat Phone"). If you are able to connect and run the emulator in a Visual C++ Native Activity application, then the issue is with Cordova Tools, and you can follow the steps below:

  1. Go to your Program Files directory and navigate to "Microsoft Visual Studio 14.0\Common7\IDE\Extensions\"
  2. Search for Microsoft.VisualStudio.MultiDeviceHybridApps.dll. There will be two copies in "Microsoft Visual Studio 14.0\Common7\IDE\Extensions\"
    • One will be underneath the "Microsoft\Emulator for Android" folder
    • The other will be under a folder with a random hash name (always changes, but it will be something unreadable like "xf1nsyzl.5ur").
  3. Copy the version of Microsoft.VisualStudio.MultiDeviceHybridApps.dll from the second folder (the one with the random hash name) in to the "Microsoft\Emulator for Android" folder (replacing the old version in that location).
  4. Navigate to "C:\Users[your username]\AppData\Local\Microsoft\VisualStudio\14.0\Extensions" and delete the contents of this folder (it's the cache).

Restart Visual Studio and the Visual Studio Emulator for Android should work properly in Cordova projects.

Upvotes: 0

Mike Jones
Mike Jones

Reputation: 320

Does your app run against other Android targets? If so, you might check this post for a few common Windows-specific issues: http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx

Upvotes: 0

Related Questions