Hi all, I'm a android library developer who recent...
# android
Hi all, I'm a android library developer who recently added Kotlin to my library - I added it like this
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.31"
and as a result it seems like I'm suddenly exceeding 64k method count and required to use multidex. Is it expected? I thought only several, used methods will be added to my final binary.
What's your min sdk version? If your 
 is 21 or higher multidex is enabled by default, and you do not need the multidex library. Please take a look here: https://developer.android.com/studio/build/multidex#:~:text=About%20the%2064K%20reference%20limit,-Android%20app%20(APK&text=The%20Dalvik%20Executable%20specification%20limits,(or%202%5E10).
our minsdk version is 16. we could enable multidex, however, we are unsure if this is normal or not so..
we just checked and adding kotlin stdlib only added 9k methods so I think it is normal. We concluded to enable multidex. Thank you @Daniele Favaro!
🎉 1
If you are using kotlin 1.4.30 you do not need to add the standard library, it will be added by default
☝️ 1
🙇‍♂️ 1
@Cheolho Jeon maybe consider using pro-guard to shrink your library and get rid of unused code. This should allow you to slip by the multidex issue. Although most apps out there use multidex nowadays