更新时间:2023-02-10 16:41:04
APP_OPTIM:=发布
将行APP_OPTIM := release
放入您的Application.mk文件
Put the line APP_OPTIM := release
into your Application.mk file
ndk-build NDK_DEBUG = 0
只需将NDK_DEBUG=0
作为参数传递给ndk-build
脚本.定义APP_OPTIM := release
后就不需要它.
Just pass the NDK_DEBUG=0
as a parameter to ndk-build
script. You don't need it once you define APP_OPTIM := release
.
-DNDEBUG
这应该进入您的LOCAL_CFLAGS
:
LOCAL_CFLAGS += -DNDEBUG
LOCAL_CFLAGS + = -O2
这实际上不是必需的,因为Android NDK已经定义了-O2
优化.
This is not required actually, since the Android NDK already defines -O2
optimization.