问题描述
根据,它允许dex文件中有更多的字符串,但我并不真正了解它的意义和对构建的影响。
这意味着如果你的dex文件中有超过2 ^ 16个引用,你可以使用 jumboMode
来适应这个,最多允许2 ^ 32参考。这是通过强制字节码始终使用巨型字符串(2 ^ 32)引用来帮助避免合并dex文件时出现的问题。
注意:这不是与方法引用的数量有关,所以当你的dex文件有超过64k的方法时,这种模式并不能解决问题。
来源:
根据我的经验,除了可能增加构建时间之外,这不应该对构建产生任何显着影响。
According to this post it allows a larger number of strings in the dex files but I don't really understand what it means and the impact on builds.
What this means is if you have more than 2^16 references in your dex files, you can use jumboMode
to accommodate for this by allowing up to 2^32 references. This is done by forcing the byte code to always use "jumbo strings" (2^32) references to help avoid issues when merging dex files.
Note: this does NOT have anything to do with the number of method references, so this mode doesn't solve when your dex file has more than 64k methods.
In my experiences, this shouldn't have any noticeable impact on builds other than a potential increase in build time.
这篇关于用于Gradle构建的dexOptions中的jumboMode的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!