Mono for Android: “aapt.exe” exited with code 1

TL;DR Also available in TL;SO (too long; Stack Overflow) flavor. Getting this error: “aapt.exe” exited with code 1? Do you have any files in your Mono for Android solution that are being packaged together with the app (e.g., “AndroidResource” build action)? If so, make sure they don’t have anything but letters, numbers, periods, and underscores ([a-z0-9_.]) in their names. Details I am still getting my feet wet with Mono for Android (MfA) development. One of my first projects was a flashlight app for my Galaxy Nexus that introduced me to a couple Android/MfA development quirks. One concept in app development that I would like to explore is long-running tasks. How do I keep something going after the user has switched off to something else? Greg Shackles has a new Visual Studio Magazine article on Background Services in MfA on just that topic. He creates a background service for playing an MP3 file using a standard Android service. In his sample project, he sets up the service to play some Creative Commons Nine Inch Nails music. I’m betting that I’m the first person to use (and include in the sample) a Nine Inch Nails song for Visual Studio Magazine. #winning— Greg… Continue reading