ELI5:Why can't Android run on any hardware without developers needing to work on optimizing it, like Windows does on all PCs?

Not an expert on this in any way, but I do know that Android operates in a runtime environment (Dalvik or ART).

Essentially, every phone - and computer for that matter - is a little different. They have different sets of instructions on how to move ones and zeroes around to do the things you want it to.

A runtime environment is a high level "program" that takes a common coding structure (the code used to write an Android app) and then it translates it to something the underlying hardware can understand, so all your Android apps can run on anything that can run Android. Awesome!

Typically, this is done ahead of time. When you do a system update to Android, you'll usually stare at a screen saying "Optimizing app x/23452". This is where the runtime is compiling (read: translating) code into something the hardware understands. This being said, this is an automatic process, and will work for most general cases.

But there are slight differences between devices. For example, Icons may appear blurry on higher resolution screens if they were made only for screens much smaller in size or quality. And due to the sheer amount of devices that can actually run Android - most microwaves could probably run stripped down Android - there's a lot of unknown variables to account for.

Android developers often struggle to keep up with trying to support every device that will run their app, because there's so many bugs and unaccountable things that go into support hundreds of devices. Not only this, but those devices are not all running the latest version of Android. They're running everything dating back to Honeycomb to now; this fragmentation problem is commonly cited as one of Android's weaknesses.

So given hundreds of devices with all unique hardware configurations, all running software that's bleeding edge or hopelessly obsolete, all on top of the task of building a good and functional app: making it all run butter smooth everywhere takes some time.

/r/explainlikeimfive Thread