Error during Android startup

After getting the latest development build, I’m unable to get a simple Android test working. During the app start up in OnCreate, the Game.Window property can no longer be set in SetContentView(); it seems as though AndroidGameWindow no longer inherits from AndroidGameView.

In the output window when debugging on a real device, everything stops before AndroidGameWindow.CreateFrameBuffer is called, so I’m assuming I need to call SetContentView at some point but with changes to the API I’m not sure what to do now. I can see that the Activity property is now set by the framework, but what about SetContentView()?

Something was changed recently. To get it working you need to change two lines in your Activity1.cs

  1. Remove the line Game1.Activity = this
  2. Remove the line SetContentView(g.Window)
  3. Replace it with:
SetContentView (g.Services.GetService<View>());

Ok so now I feel like a doofus, I actually did see in AndroidGameWindow where it was set but didn’t even think about getting it from the services. Thanks!