简体   繁体   English

Android Studio中相同代码的导出apk比Intellij IDEA大得多

[英]Same code's exported apk in Android Studio is way bigger than Intellij IDEA

I have this very simple application with one simple Activity that on start downloads a file from a server. 我有一个非常简单的应用程序,其中包含一个简单的活动,该活动一开始就从服务器下载文件。 That's it. 而已。 Nothing more. 而已。 Yet when I export this application from Android Studio, the apk size is 1.1 MB, and when I export it from IntelliJ IDEA, it becomes as small as 40 KB. 但是,当我从Android Studio导出此应用程序时,apk大小为1.1 MB,而从IntelliJ IDEA导出时,它的大小只有40 KB。 That's a HUGE difference. 那是巨大的差异。

What might be wrong here? 这里可能出什么问题了? Everything is in default mode, just the IDE differs here. 一切都处于默认模式,只是IDE有所不同。

Need to set the shrinkResource to true 需要将shrinkResource设置为true

And also set the shrinkMode to strict for maximum shrinking. 还要将rinkleMode设置为strict以最大程度地缩小。

Follow this link shrinkResources set to true, but all unused resources (specifically drawables) not getting removed 按照此链接将rinkResources设置为true,但不会删除所有未使用的资源(特别是可绘制对象)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法将AOSP代码导入IDEA / Intellij / Android Studio - Failed to import AOSP code to IDEA / Intellij / Android Studio 正则表达式在IntelliJ想法中编译,但不在Android Studio中显示 - regex compiling in intellij idea but not in android studio and showing 在android studio / IntelliJ IDEA中使用标记接口 - Using marker interfaces in android studio / IntelliJ IDEA IntelliJ IDEA 13和Android Studio之间的差异 - Differences between IntelliJ IDEA 13 and Android Studio 有没有办法使用Android Studio部署Libgdx桌面应用程序(基于IntelliJ Idea的IDE) - Is there a way to deploy Libgdx Desktop application with Android Studio (An IntelliJ Idea based IDE) 在 Android Studio/Intellij idea 中自动生成 Android Log TAG - Auto-generate Android Log TAG in Android Studio/Intellij idea Intellij IDEA代码覆盖率错误地显示少于100% - Intellij IDEA code coverage incorrectly shows less than 100% 如何在Intellij IDEA或Android Studio中搜索未解析的库? - How to search unresolved libraries in Intellij IDEA or Android Studio? 在实例 IntelliJ IDEA / Android Studio 快捷方式上创建方法 - Create method on instance IntelliJ IDEA / Android Studio shortcut 是什么决定了IntelliJ IDEA / Android Studio中填充“外部依赖项”的原因? - What determines what populates “External Dependencies” in IntelliJ IDEA/Android Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM