VS 2017 not debugging Xamarin App on Phone through USB

Hey guys, I am not sure if this is the right place to post this but I did not know where to post it.
--BACKSTORY--
I am making an app for my assignment, everything was working good. The Xamarin App was loading on my phone pretty well, I was coding and had some errors. App crashed, I fixed the code, being stupid for some reason I uninstalled the app from my phone(This is where the issues started)

After that, when I tried to deploy the app on my phone, it would crash. I found the solution to that.

However I had never tried ADb command prompt so I had no clue, and I thought I had already uninstalled the app on my phone. So I went into the apps, searched the app, it wasnt there, so I searched Xamarin, and it popped up as Xamarin.Support in the Apps section on my phone. Me being stupid, I deleted that. Then a little later, I found the Adb command prompt, wrote the line and uninstalled. After that my phone would not show on the top of VS, had to unplug and plug in the USB a couple of times, disable Developer mode. After a while, it started showing.

--ISSUE--
When I try to deploy my app on my phone, it builds everything, but crashes immediately after starting. I thought there must be something wrong with the code. So before I made any changes, I made a new VS Xamarin File, and ran it on my phone... Same issue, crashes immediately after starting. I tried both my files on an actual emulator and they work fine. So I really dont know what the issue is but this assignment is due very soon, and the teacher will mark it in class on the phone itself. If someone could please help! or direct me to the right place for this to be posted.

Thank you!

  • Zinc

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    First of all, Go into Settings > Developer options and turn USB debugging ON.

    Open your device, open the application management, found the following items, delete it, after that, deploy it in your device.

    Then, you can get the details error message in the VS by select the Diagnostics like following screenshot.

    Next, Please check you have enabled following settings.

  • ZincoroZincoro Member ✭✭

    Hey man, Thanks for replying. I have just followed the steps.
    USB Debugging ON
    I searched Xamarin.Android & Mono, only found Mono and deleted.
    Then I made sure everything was same as in screenshot. Ran it, and it still crashes on startup.
    Then I searched Xamarin.Android on my phone and it was still not there.

    I think the reason it is crashing is because there is no Xamarin.Android or Xamarin.Support file on my phone device.
    I had tested this on another Samsung Phone and it worked, it is not working only on my phone after I deleted Xamarin.Android or Xamarin.Support from my phone. Is there a way to get this file back? that will probably fix it.
    Thanks!

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Normally, these two packages will be installed automatically, even if you have removed it.

    Did you close the developer mode, then reboot your android device, reopen the developer mode. If this issue is disappear.

  • ZincoroZincoro Member ✭✭
    Yes, I have tried that aswell. I dont know why it wont reinstall that package.
  • LeonLuLeonLu Member, Xamarin Team Xamurai

    If this Hua Wei device is your test machine, would you mind operating a factory Reset?

  • ZincoroZincoro Member ✭✭

    That is in my mind, I am leaving that as my last choice, there is so much backup to do, it will take me too long and with all these assignments on my head. I will however have to reset phone if I do not find a solution within the next month or two :[

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Yes, If you can running your project in the Samsung Phone and it worked, this issue is related to the HuaWei Phone, And operating a factory Reset may be a direct way.

Sign In or Register to comment.