开发者

Proguard significantly increasing APK size in Android

I'm using the default settings in Eclipse to export my application and have Proguard obfuscate it.

The problem I'm having is that the exported APK is significantly larger than the APK I get when doing debug builds (~7MB instead of ~2MB).

If I look into the APKs I get the following:

(non-proguard)

/assets               (1.2 MB)
/META-INF             (42.3 KB)
/res                  (765.9 KB)
AndroidManifest.xml   (6.6 KB)
classes.dex           (416.1 KB)
resources.arsc        (49.5 KB)

(proguard)

/assets               (1.2 MB)
/hooks                (13.7 KB)
/info                 (240 b开发者_高级运维ytes)
/logs                 (101.1 KB)
/META-INF             (496.6 KB)
/objects              (4.3 MB)               <-- main size difference
/refs                 (155 bytes) 
/res                  (777.4 KB)
AndroidManifest.xml   (6.6 KB)
classes.dex           (101.5 KB)
resources.arsc        (50.3 KB)

Any ideas on what I'm doing wrong (it should be getting smaller!!!)?


classes.dex is significantly smaller so it looks like Proguard is working.

hooks, info, logs, objects, refs are Git directories – looks like you've mistakenly included them in your build.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜