What does 'String count' mean in Dex file Android?

前端 未结 2 351
再見小時候
再見小時候 2021-01-15 01:14

From adt-21-preview DOC

Building

There\'s a new flag to force "jumbo mode" for dex which allows a larger number of strings

2条回答
  •  感情败类
    2021-01-15 01:32

    All strings constants are stored in a dex file in a single sorted list. The strings are then referenced elsewhere in the dex file by index within that list.

    These string indexes are generally an unsigned 32-bit integer. As far as the actual instructions go, there are 2 instructions that can reference a string: const-string and const-string/jumbo. The first takes a 16-bit string index, and the second takes a 32-bit string index.

    So, the maximum number of strings is 2^32 = 4294967296

提交回复
热议问题