top | item 15446996

(no title)

bgwhn | 8 years ago

A large amount of that 1.5 MB of code is to shim around the incompatibilities between different versions of the shared libraries that ship with Android. The root of the problem is that not everyone is on the same version of Android.

discuss

order

userbinator|8 years ago

The root of the problem is that not everyone is on the same version of Android.

Alternatively, it seems the root of the problem is that all the different versions of Android don't have enough commonality for compatibility. I have apps which were originally written for Win95 and continue to work on Win10. Microsoft hasn't always made great decisions, particularly recently, but seeing a single small binary run unchanged over 20+ years of platform differences is something that IMHO other companies can learn much from.

(I know Android devices, despite mostly being ARM, cover a wider range of architectures... but isn't that what basing everything on Java was supposed to solve?)

dlubarov|8 years ago

I don't really see a difference. Android's API changes are almost always backwards compatible. There are a few exceptions, like AudioManager.setRouting (now a no-op), but they're very rare. For the most part, apps built for for early versions of Android still work fine on modern devices.

The support libraries which the parent referred to are optional utilities. They're often the most convenient way to implement something like a snackbar (https://material.io/guidelines/components/snackbars-toasts.h...), but they're by no means required. Just like on the Windows side, WPF is probably the most convenient way to create a ribbon, but you could build your own with the old win32 APIs if you wanted to, or just not use ribbons.

dheera|8 years ago

Not everyone is on the same version of Chrome either. It works out just fine. If you want a feature that the user's version of Chrome doesn't have, you detect that and inform the user.

kasabali|8 years ago

That shim is still same in all apps bundling the same version, though. Thus it is possible to distribute it out of band as a shared component just like system webview.