https://kotlinlang.org logo
#android
Title
# android
c

Colton Idle

05/19/2020, 6:57 PM
Does anyone know how I would be able to tell if my final apk is bundling kotlin reflect? I heard that if you add Moshi and moshi-kotlin it will have to pull in the kotlin reflect lib which in turn would make your apk ~2MB larger in size. I've used the apk analyzer and I wasn't able to find anything that large, but curious if anyone knows better than me.
c

Cody Engel

05/19/2020, 7:07 PM
Analyzer would be my goto. I thought I used moshi-kotlin at a previous company and our APK was around 6mb I think so I am quite skeptical it would add that much to your apk unless you aren't minifying
👍 1
c

Colton Idle

05/19/2020, 7:08 PM
Not minifying, but yeah I'm confortable using apk analyzer I jst kind of don't know what I'm looking for.
c

Cody Engel

05/19/2020, 7:11 PM
If you start by looking at
classes.dex
and going through the other ones (might be multiple if you have multi-dexing). Clicking on the dex file within analyzing lets you look at the different packages, classes, and functions
c

Colton Idle

05/19/2020, 7:43 PM
Do you know what package I'd be looking for? Not super comfortable with the topic of reflection so I'm not 100% sure what I'd be looking for.
c

Cody Engel

05/19/2020, 7:48 PM
I think it's
kotlinx.reflection
either that or
kotlin.reflection
👍 2
3 Views