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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章