如何使用 Xamarin for Visual Studio 在真正的 Android 设备上进行调试?
我已经找到了一些链接,但他们没有解释这是如何做到的。我可以使用 XamarinStudioIDE 进行调试,但是与 VisualStudio2012相比,那个 IDE (无意冒犯)是蹩脚的。
使用 VisualStudio2012,似乎只有选择要调试的模拟器的选项。那么我如何让它通过 USB 调试我的真正的设备(我已经有 USB 调试 = 真) ?
You will get a confirmation prompt on the android device to ask if the PC is allowed to connect. It's easy to miss this if your device's screen has gone to sleep.
tl;dr Install drivers if you haven't already done so.
As mentioned in one of the comments above I installed the device specific USB driver (LG drivers are here) and it solved my problem. It now works perfectly.
I was under the (incorrect!) impression I wouldn't need to install the drivers to enable debugging. I could already connect my device to my laptop to view files etc. and hence thought drivers were unnecessary.
I'm using Visual Studio 2015 with Xamarin and the only way I can get it to recognize my Galaxy S4 is to turn USB debugging off and back on again while VS is running. This is required everytime I wish to use this phone with VS. I've never had to do this with Android Studio.
I set my Mobile connection in USB charging mode and enable USB debugging. It may ask for driver installation, after driver installation disconnect the mobile and reconnect it, now this should show in Visual studio device list for debugging.
Once everything else is ready, the device could appear under the "Not compatible devices" list. This could be happening if the "Minimun Android version" set in your project is higher than android version you have in your device. If so, you can set the "Minimun Android version" in the android manifest