android dex编译,android编译dex-preopt

本文详细介绍了Android 2.3在构建过程中如何进行dex预优化(dexpreopt),包括在buildspec.mk中设置变量、编译相关文件的修改以及dexpreopt-one-file函数的调用。内容涉及到编译变量、条件判断和签名过程,揭示了预优化apk的步骤。
摘要由CSDN通过智能技术生成

对于android2.3编译时候选择下面的情况,既可以对dex进行preopt优化了。

$ cat buildspec.mk

TARGET_BUILD_VARIANT:=user

TARGET_BUILD_TYPE:=release

编译相关文件:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

build/core/product_config.mk:164

# Hack to make the linux build servers use dexpreopt (emulator-based

# preoptimization). Most engineers don't use this type of target

# ("make PRODUCT-blah-user"), so this should only tend to happen when

# using buildbot.

# TODO: Remove this once host Dalvik preoptimization is working.

ifeq ($(TARGET_BUILD_VARIANT),user)

WITH_DEXPREOPT_buildbot := true

endif

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

build/core/dex_preopt.mk:127

# dexpreoption for binary released jars

# ONLY enabled in custom release

ifeq ($(PARTIAL_BUILD),true)

ifeq ($(WITH_DEXPREOPT),true)

$(foreach m,$(DEXPREOPT_BINARY_RELEASE_BOOT_JARS_MODULES), \

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值