Search code examples
androiddalvikandroid-runtime

Does ART's ahead-of-time compilation optimize resources


The new Android Runtime (ART) that replaces the old Davlik virtual machine in newer Android versions introduces ahead-of-time (AOT) compilation. Thus, applications get compiled on devices using the dex2oat tool, which compiles dex files, packed into the application apk, to native target applications. My question is if during this process also resource optimizations, like stripping resources for other display resolutions, are performed.


Solution

  • No, ART is only concerned with the runtime code (dex). Resources are packed as usual into the APK. Native libraries (NDK built) are extracted at install time, but only the native lib(s) for the architecture in which the APK is being installed, just as before.