Jeremy S Brown

Professional Learner with a Passion for Writing Software

Powered by Genesis

Note to Self: Adding Resources to Xamarin.Android Project

November 30, 2013 by Jeremy Leave a Comment

While working on my latest cross-platform project using Xamarin I started to get a build error in my Android project that stated:
“aapt.exe” exited with code 1

Turns out this was due to the resources that I recently added to the project. The resource was a mp3 file that I downloaded from freesound.org. When adding resources the file name needs to follow the same naming rules for Java identifiers. The file I added had dashes which is not allowed. Renaming the file with underscores fixed that issue.

The other issue I discovered is that you need to make sure any resources you downloaded are unblocked. The project may build and deploy, but will crash. To unblock a file right-click on the file from File Explorer and select properties. Click on the Unblock button. Of course you only want to do this from any file you downloaded from a trusted source, and even then exercise caution.

UnblockFileDialog

Filed Under: Android, Cross Platform Development

Portable Libraries: More trouble than they’re worth!

April 13, 2013 by Jeremy Leave a Comment

One of the hopes that I had as I started this quest of cross-platform development was being able to utilize portable class libraries. However I have spent more time banging up against brick walls than I would like. Yes you can create a single project and reference them across multiple platforms, but at some point you will reach a path that is not supported in one platform and you’re screwed. This can be just one method that is not support in one library but in the others and 98% of the time you really NEED that method. So I am right back to having to create a library project for each platform and reference the portable library. For now I am just going to stick with what works for me. File linking and compiler directives. Yes it is clunky and time consuming, but predictable and more manageable.

I not going to give up completely on portable class libraries, but for now I need to spend more time working on my app rather than making them work because at this point they’re not saving me anything.

Filed Under: Cross Platform Development, Ramblings

The Evolution of a Cross Platform Developer

March 11, 2013 by Jeremy Leave a Comment

You can’t ignore it. Mobile is changing everything. How we conduct our daily lives, our children’s connection with technology, and for the software developer our careers. Not wanting to be left behind and miss out on all the fun I am diving in starting to drink from the fire hose. I’ve started the quest for the cross platform holy grail of writing for as many mobile devices has possible with as much code reuse as possible. Now I am not talking “Write Once, Run Everywhere”. That’s just crazy talk because that just leads to “Write Once, Suck Everywhere” or “Write Once, Debug Everywhere”.

I’ve experimented with writing apps for the Windows Phone and Windows 8 so I want to utilize my C# skillset as much as possible. In order to bring Android and iOS into the mix it’s only natural that I look to Xamarin’s toolset to begin this quest. With their latest offering you can now develop for both Android and iOS within Visual Studio! Of course you still need a Mac in order to deploy to the iOS simulator or device, not to mention about $2K for both Android and iOS licenses from Xamarin. Not going to be cheap, but I hope it’s going to be fun and my goal to write about every step of the journey.

Filed Under: Cross Platform Development

  • « Previous Page
  • 1
  • 2
  • 3
  • 4