Difference between D8 and R8 android

后端 未结 3 928
孤城傲影
孤城傲影 2021-02-04 05:48

As android studio introduced two new tools D8 and R8. As per google documentation D8 is a dex tool and R8 is a progourd tool but as their explanation both are doing almost same

3条回答
  •  失恋的感觉
    2021-02-04 06:30

    I think the introduction of this blogpost is a great resource to answer that question: https://jakewharton.com/r8-optimization-staticization

    R8 is a version of D8 that also performs optimization. It’s not a separate tool or codebase, just the same tool operating in a more advanced mode. Where D8 first parses Java bytecode into its own intermediate representation (IR) and then writes out the Dalvik bytecode, R8 adds optimization passes over the IR before its written out.

提交回复
热议问题