Android Studio: Difference in size between Build APK vs Run APK

后端 未结 4 1836
我寻月下人不归
我寻月下人不归 2021-01-11 23:27

I have noticed a difference in size between the apk generated with these 2 options.

why is this happening ?

With the Build -> Build APK opti

4条回答
  •  囚心锁ツ
    2021-01-12 00:13

    Build APK is a shortcut for running the :app:assembleDebug Gradle task (assuming you have the debug variant active in the Build Variants window).

    When running the application, we first ask you which device you want to target and then pass the information to Gradle. Among other things, this lets us filter out unnecessary resources. If you have Instant Run enabled, we also package additional code into the APK.

提交回复
热议问题