Visual Studio 2015开发Android App问题集锦

Visual Studio 2015开发Android App 启动调试始终无法完成应用部署的解决方案

创建一个Android App项目后,直接启动调试发现Visual Studio Emulator for Android已成功运行,但应用始终处于Build中(等待时间超过1小时),并未如预期通过adb部署到模拟器中。将应用直接导出apk,拖拽至模拟器直接部署,提示:

File transfer failed. Error: Unable to install the file through Adb. Adb.exe not found. Make sure you have Android SDK Tools installed.

查看进程列表发现adb.exe已经启动,并且和Visual Studio有通信,但XDE和adb.exe没有通信。应该是XDE无法定位Android SDK路径所致。于是运行Process Monitor,再次尝试拖拽apk,终于发现XDE查找名为"HKCU\Software\Microsoft\VisualStudioEmulator\Android\AdbPath"的注册表键值,添加对应的键值问题解决。怀疑和我并没有通过Visual Studio直接安装Android SDK有关系,导致一些设置无法生效。

引用博客: http://www.cnblogs.com/junchu25/p/4885814.html

 

Visual Studio 2015开发Android App 无法附加断点 Could not connect to the debugger.

  

I had same issue and I was able to connect debugger by following this:

http://dotnetbyexample.blogspot.cz/2016/02/fix-for-could-not-connect-to-debugger.html

In short:

  • Disable "Use fast deployment (debug mode only)" in Android project -> Properties -> Android options -> Packaking

  • Enable "Migrate to a physical computer with a different processor version" in Hyper-V manager go to VM -> Settings -> Processor -> Compatibility

posted @ 2016-06-15 10:47  xakoy  阅读(605)  评论(0编辑  收藏  举报