Saturday, November 14, 2015

Troubleshooting Xamarin Deployment to Android Devices

I tend to experience bizarre issues with widely used programs, and my interactions with Xamarin (a toolkit for building mobile apps with .NET and Visual Studio) did not buck the trend.

First, I received an error indicating that no project was set to deploy. That was solved by opening the solution's properties and checking the "Deploy" box under the appropriate project in the Configuration section.

Then, there were errors in the deployment stage, something about being unable to deploy the previous version. Apparently, I didn't have any virtual devices set up as deployment targets. The emulator manager (AVD) wouldn't even open; a console window appeared, scrolled through a whole lot of messages, and vanished. To correct that, I had to launch Xamarin Studio (not Visual Studio) or Android Studio to get the targets set up. I could then launch the AVD to add an emulator.

Finally, I had problems getting the remote debugger for my real phone to work. It turns out that since I installed the Android ADB drivers on my computer while the phone was plugged in, I needed to purge the authorization list in the phone's developer tools and reconnect it to get the "do you want to trust this machine" dialog.

No comments:

Post a Comment