[英]Android apk patch file to large after use d8 dex compiler
I use bsdiff to patch apks that were compile by d8 dex compiler, but the patch file is too large, about 60% compare to the original apk file.我使用 bsdiff 修补了由 d8 dex 编译器编译的 apk,但是修补程序文件太大,与原始 apk 文件相比大约 60%。
At first I use gradle plugin 3.0.1, and "multiDexEnabled true", and the apk contained about sixty to seventy dex files.起初我使用 gradle 插件 3.0.1 和“multiDexEnabled true”,apk 包含大约 60 到 70 个 dex 文件。 And the patch file is very small, about 0.7M, and my apk size is always about 8M.
而且补丁文件很小,大概0.7M左右,我的apk大小一直在8M左右。
Several month ago, I changed gradle plugin to 3.1.2.几个月前,我将 gradle 插件更改为 3.1.2。 Then I found my apk wase 7.2M, and just only 2 dex files in the apk, but the patch file increase to 4M!
然后我发现我的apk有7.2M,而且apk里只有2个dex文件,但是补丁文件增加到了4M!
I think it's cause by the d8 dex compiler.我认为这是由 d8 dex 编译器引起的。
Is there anybody know how to keep sixty to seventy dex files whit d8 dex compiler?有人知道如何使用 d8 dex 编译器保存 60 到 70 个 dex 文件吗? Because bsdiff can patch mutch smalller patch file with manny dex files.
因为 bsdiff 可以用 manny dex 文件修补 mutch smalller 补丁文件。
Or Is there any other patch tools better than bsdiff?或者有没有比 bsdiff 更好的补丁工具?
D8 make dex byte code change more when first time. D8 使 dex 字节码在第一次更改时更多。
you can change some code and make an apk again,then you can use bzdiff compare them.您可以更改一些代码并再次制作一个apk,然后您可以使用bzdiff比较它们。 I think they should be change small.
我认为他们应该改变很小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.