问题
Just created a Xamarin.Forms app in Xamarin Studio 5.2.1 using the Blank App (Xamarin.Forms Portable) template.
Made no code changes, built solution, attempted to run it on a connected Android device via right-click on my .Android project and choosing Run With.
Instead of deploying and starting the app, I get an error "Execution failed: Object reference not set to an instance of an object."
Has anyone run into this and figured out the problem?
回答1:
Found https://bugzilla.xamarin.com/show_bug.cgi?id=21508 and inferred that no startup project set for the solution could be the cause of the exception.
Set my .Android project as startup project and all is well.
来源:https://stackoverflow.com/questions/25415911/xamarin-forms-app-will-not-run-on-android-device