Is it valid to compare the "fragmented Android OS means writing code for old versions problem" to the browser fragmentation issues we've been dealing with on the web for so long? I can't really answer this as I haven't written any Android code.
If that is a valid comparison then perhaps building a library to abstract away the OS differences (like e.g. jQuery) is a big opportunity for someone. On the other hand maybe there are some features that are impossible to emulate on older platforms, or there are orthogonal features that can't be abstracted away.
One of the big differences is that if you do wish to use some crazy new HTML5 that is unsupported in most browsers for a niche app or demo, you can ask your users to update their browsers and they can do so for free. Unfortunately most android device owners are locked in by device manufacturers.
It's already happening - for example, as mentioned in [0], there are several apps / services which provide abstracted flashlight functionality across phones.
The comparison is quite valid, in my opinion - in much the same way that modern web browsers exist which have fixed many of the irritating API issues and abstraction mistakes of their predecessors, new Android versions provide corrected abstractions and a cleaner API but are rarely available.
The iPhone 3G is stuck on iOS 4.3, which is last year's OS. The iPhone 3GS runs the latest iOS. If you target iOS 4 as the lowest common denominator, you will reach everyone but the iPhone 1 buyers, which was discontinued July 11, 2008. I guess there might be a few in the wild, but good luck getting the battery changed.
Targeting iOS 5 may be less wise. But even then, you will only be missing the customers who bought the cheaper 3G instead of the 3GS (about 2 and 1/2 years ago), or customers with 3 year old phones. Or people who haven't upgraded their OS, which will probably be more significant.
With Android, you can target 2.2 (SDK released 20 May 2010), 2.3 (SDK released 6 December 2010), or 3.0 (SDK released 22 February 2011). And you won't find many customers with an early 2010 phone who've been able to update to 2.3, and few with a late 2010 phone who've updated to 3.0, the 2011 OS. Seriously, WTF?
We might look back at this as time when Google made advances in the OS, but not a time when developers reached a large market. Kind of like the iPhone - iPhone 3G transition. Remember the hacks and jailbreaks then?
I don't think anyone is arguing there are mobile OSes that have zero fragmentation, unless there has only been one release. It's about the degree of fragmentation.
Makers of iOS apps can safely develop for iOS 4.2, since more than 97% of iOS devices have at least that version installed [1]. IOS 4.2 is little over a year old. Can a full time Android app maker afford to solely develop for Android 2.3 (which is also a year old)?
If you were developing an app today, you'd probably want to target 2.2 as a baseline profile. That covers 90+% of the devices out there, and it excludes some of the first and second generation devices that are going to be the real pain to develop for. In six months to a year, 2.1 will be off the radar for developers:
If that is a valid comparison then perhaps building a library to abstract away the OS differences (like e.g. jQuery) is a big opportunity for someone. On the other hand maybe there are some features that are impossible to emulate on older platforms, or there are orthogonal features that can't be abstracted away.