简体   繁体   English

使用d8 dex编译器后Android apk补丁文件变大

[英]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.

相关问题 如何在android studio中启用dex编译器D8(下一代Dex编译器) - How to enable dex compiler D8(Next-generation Dex Compiler) in android studio D8:无法在单个 dex 文件中容纳请求的类 - D8: Cannot fit requested classes in a single dex file 引入D8 dexer之后,Android当前使用哪个编译器将Java编译为.class文件? - Which compiler is currently used in android to compile Java to .class files after D8 dexer was introduced? Android中.dex文件和.apk之间的关系以及dex方法的计数限制 - the relationship between .dex file and .apk in Android and the dex method count limit 如何在另一个Android项目中使用dex2jar从apk转换获得的jar文件? - How to use a jar file obtained from apk conversion using dex2jar in another Android project? 为什么我重新打包APK后更改了classes.dex文件? - why classes.dex file changed after I repacked the apk? 未创建Android APK文件和DEX文件,没有任何警告或错误 - Android APK file and DEX files not created, with no warning or error 在什么情况下会在Android .apk文件中创建多个.dex文件? - In what situation would multiple .dex files be created in Android .apk file? 如何确定用于创建 apk 的 dx/d8 版本? - How to determine which dx/d8 version was used for apk creation? D8和R8 android之间的区别 - Difference between D8 and R8 android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM