run Python script in Android.mk on Android building system

本文介绍了如何在Android.mk文件中插入一个名为myprepare.py的自定义Python脚本,该脚本在构建apk时会被调用。通过此方法,开发者可以在构建过程中执行特定的Python操作,如复制文件或执行其他任务,从而实现构建流程的自动化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Insert the bellowing line into Android.mk

 

$(shell python $(LOCAL_PATH)/scripts/myprepare.py)

 

When running mm command or other command to build your apk, the script myprepare.py will be invoked.


You can copy some files or do any thing python can do.But notice: don't add any print function in your python script.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值