Home > Enterprise >  Debug a real Android device using Xamarin for Visual Studio
Debug a real Android device using Xamarin for Visual Studio

Time:01-02

I'm a beginner in mobile development, and I'm developing an application in Xamarin.Android with Visual Studio 2019, with SQLite and the MVVM pattern. The project structure is simple, I'm not using API's or external services. For debugging, I'm trying to use my physical device (Android 9.0 - API 28, Itel S15 tag), but unfortunately the following error message is returned in Visual Studio (Debug output):

Forwarding debugger port 8865
Failed to launch android application

it's the first time i've tried this, i've always debugged in an installed emulator,I have USB debugging enabled as well as developer mode on the physical device. I've done a lot of research and I can't find anything specific to my problem. Please any ideas?

CodePudding user response:

Before debugging can occur on a device, it must be setup for development and connected to your PC or Mac.

Here are documents about how you can set up the device and how to debug on device https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/set-up-device-for-development

https://docs.microsoft.com/en-us/xamarin/android/deploy-test/debugging/debug-on-device?tabs=windows

  • Related