Android requires .class compatibility
Among new iOS developers, the awfulness of XCode is a well-accepted fact. I get it: for anyone coming over from Visual Studio, it can be a rough ride. It’s like switching from a Range Rover (immaculately detailed, perfectly climate controlled, exquisite sound system) to a beat-up old jeep (cloth top open, doors off, windshield down). It’s a rougher ride, but there are places you’ll take that jeep you would never dare drive the Range Rover, and you’ll be better off for it.
I was thinking about common developer complaints about XCode today when doing a little Android work. I grabbed the latest code to one of our Android projects today, opened it in Eclipse, and tried to build it. It failed with the following reason:
Android requires .class compatibility set to 5.0. Please fix project properties.
If you open the project properties and dig through every pane, sub-pane, and sub-sub pane, you’ll never find an option for “.class compatibility.”
Obtuse error messages? Inadequate instructions? Just like XCode!
But to be fair, XCode has gotten tremendously better in recent releases. Error messages are greatly improved. Common errors are found and fixed for you. The current release will even automatically connect to the Provisioning Portal and manage devices and profiles for you. Without a doubt the biggest impediment to developers learning the iOS platform is dealing with certificates and profiles, and XCode just made it automatic. Nowadays most complaints about XCode are really just veiled complaints about gdb, objective-c syntax, or Macs in general.
Anyway, back to Android. What’s the fix? Don’t actually try to fix the project properties yourself. Right-click on the project name in the project explorer and, in that stupidly long menu, go to the 28th item (seriously, I counted them, it’s 28 not counting the separators) called “Android Tools,” and in the submenu, go to the last item called, appropriately enough, “Fix Project Properties.”
I love driving jeeps. I love the wind stinging my eyes and bugs getting stuck in my hair. But even I have limits. Hey, Android Development Tools: would it kill you to maybe execute that yourself if you see that it needs to be done?