Sometime when working with Xamarin and Visual Studio, you encounter problems when trying to debug your app on an android phone. One of these problems is somewhat annoying: Your debug process starts, the application seems to be deployed to the device and start up, and then stops with the message

The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true). Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration.

Now of course you hab a launchable activity, your app did work just fine a second ago! Checking your android device, the app icon is missing aswell here. So after testing out a bunch of solutions like rebuilding and cleaning the project, restarting VS and the PC, the actual solution is pretty straightforward:

On your android device open up the Settings app. From here, navigate to the "Apps" and search for your app. It will probably not show up under its name but under its package name, so e.g. com.yourcompany.yourappname Click it and delete the leftovers, head back to VS and everything should work fine again!

Posted in General Thoughts, Xamarin.Forms on Dec 04, 2016