windows下cocos2dx3.4中打包apk的方法

1. 新建build_release.bat,首先将res和src拷贝到assets下,然后调用ndk的编译方法。内容如下

rd /s /q assets
xcopy "../../../res" "assets/res" /e /i /h
xcopy "../../../src" "assets/src" /e /i /h

::cocos compile --no-res --compile-script 0 -m release -p android

goto build

:build_error
pause

:build
call %NDK_ROOT%/ndk-build.cmd -j2 NDK_MODULE_PATH=../../cocos2d-x;../../cocos2d-x/cocos/;../../cocos2d-x/external;../../cocos2d-x/cocos/scripting NDK_TOOLCHAIN_VERSION=4.8

if errorlevel 1 goto build_error

call %ANT_ROOT%/ant release
if errorlevel 1 goto build_error

2. 修改ant.properties,设置签名文件所在目录

# This file is used to override default values used by the Ant build system.
#
# This file must be checked into Version Control Systems, as it is
# integral to the build system of your project.

# This file is only used by th
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值