Timo Drick

    Timo Drick

    2 years ago
    I just noticed a big APK size increase from dev13 to dev14. So problem is that many appcompat libs get now included. (I run minify to opimize output APK) The minimal archiveable APK size was about 600 KB with a simple HelloWorld sample. Now with dev 14 it is about 1.1 MB. Not sure if this is a bug? So i could provide a sample project and file a bug report.
    Adam Powell

    Adam Powell

    2 years ago
    Please do and yes, we're watching the size carefully. Part of it is that some parts of compose need a minimum version of some libraries if those libraries are present, as various bugs were fixed/other dependencies configured
    An example is some of the view tree service discovery APIs for things like the local LifecycleOwner - the APIs themselves are lower level in other jetpack libs but if you're using an old enough version of fragments or appcompat, they aren't registered properly. Simply including the dependencies in compose is a short term workaround to make sure people don't lose too much time to the resulting debugging.
    Timo Drick

    Timo Drick

    2 years ago
    I understand that this is necessary. For me i just use single activity and no fragments. Anyway i filed a bug: https://issuetracker.google.com/issues/161814404 And also created a sample project here: https://gitlab.com/compose1/compose-minimal-hello-world
    cb

    cb

    2 years ago
    Would be interesting to see where the space is being used in APK Analyzer
    Timo Drick

    Timo Drick

    2 years ago
    In dev15 it is a little bit less but still way more than in dev13 The biggest increas i see in the appcompat +200 KB also the android package gets from 15 KB to 46 KB and since new kotlin 1.4 kotlinx increased from 78 KB to 96 KB
    I attached apks to the bugreport for easy analysinghttps://issuetracker.google.com/issues/161814404