Running MonoGame on Android Wear

Getting MonoGame projects to run on Android Wear requires a different setup than normal solutions, from emulator to asset settings.

First problem I ran into looked like below and was easily enough solved by activating the “Use Host GPU” option when creating a new emulator image.

 OpenTK.Platform.Android.EglException: Failed to find a valid GraphicsMode configuration

Since MonoGame is available on NuGet, I started by creating an Android Wear solution and adding the framework binaries. But adding the project images in the usual “drawable” folder was giving me the following error.

Could not load * asset as a non-content file

This was triggered by the lacking Content directory in my project structure, the place where all the assets should go and which ends up in the resources bundle at runtime.

Also important, I marked my assets with the “AndroidAsset” build action, instead on “Content” or “AndroidResource”.

Advertisements

Get started with MonoGame in 5 easy steps

MonoGame is the little brother of Mono: a small and cool platform for making (mostly) 2D games. It’s an open source implementation of XNA and is compatible with iOS, Android, Mac, MacOS, Linux and Windows 8 (support for more platforms is coming). If however, more complex and 3D games is your thing, you can head out to Unity3D, also in the Mono family.

1. Get MonoGame from CodePlex

Download the latest MonoGame version from Codeplex. The is are multiple versions: a Windows one, a MonoDevelop one and, finally, the one we need, the Xamarin version. They each come as an .mpack, which needs to be installed in the corresponding IDE.
Continue reading