【问题标题】:is app-debug.apk the application actual size?app-debug.apk 是应用程序的实际大小吗?
【发布时间】:2019-05-09 23:00:02
【问题描述】:

我的问题是关于通过转到 build 然后转到 build (APKS)locating 文件生成的文件,得到 app-debug.apk 是我的应用程序的实际大小吗?

经过这个过程后,我发现我的应用程序是 7MB 就够了吗?

【问题讨论】:

标签: android android-studio


【解决方案1】:

有 2 个构建变体,它们是 debugrelease。默认构建选项设置为debug,通常具有更大的大小。要构建 release 变体并减少 APK 大小,您可以使用 ProGuard 并将 build.gradle 中的 minifyEnabled 设置为 true。要了解有关使用 ProGuard 的更多信息,请访问以下链接:

How to use the ProGuard in Android Studio?

要查找一些 ProGuard 规则,请访问此链接:

android-proguard-snippets

android 开发者网站上的一些其他有用的文章:

Configure build variants

Sign your app

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-03-19
    • 1970-01-01
    • 2018-02-06
    • 2019-02-21
    • 1970-01-01
    • 2019-12-30
    • 1970-01-01
    相关资源
    最近更新 更多