1
votes

After updating my project to Xamarin Forms 5.0 I cant run it on my phone. I tried a blank Xamarin Forms 5.0 project and it worked, but my real project prints "Deployment was successful to [Device]" but nothing happends. It installs the app but it is corrupted or something, because the app is not visible on home screen, but exists in "settings > app" with no icon (and the size 154mb as it should be)

I have no idea what causes this and have tried everything to make it run on my phone. When archiving it I get "Cannot create archive file because the copy of mdbs files failed"

I get no compile errors when I press Build -> Build solution

  1. I have tried deleting the app via adb/system and reinstalling it via vs.
  2. I have tried removing the obj and bin folders and rebuilding.
  3. I have tried rebooting and reinstalling android sdk.
  4. I have tried restarting the android abs server

My phone is android-28 and the minsdk is 21, targetsdk is 29

(Xamarin.Forms v5.0.0.1874, Xamarin.Essentials v1.6.0, Visual Studio 2019 v16.8.4)

full build log when trying to debug: https://pastebin.com/dgqQvh24

1>Deployment was successful to [DEVICE].
1

1 Answers

1
votes

This issue was caused by an invalid AndroidManifest.xml file. Simply removing a duplicate tag caused the build to succeed. For some reason xamarin forms 4.8 ignored this in the building process, but xamarin forms 5 "Failed to parse Activity Name" because of the duplicate tag.

For anyone expericing this issue just fix the AndroidManifest.xml