原文:http://stackoverflow.com/questions/14564918/android-ndk-release-build
Unless you have created the Application.mk or defined your application as debuggable inside the AndroidManifest.xml you don't have to do anything because by default the application's modules are compiled in release mode by the ndk-build script.
Otherwise, you can use the APP_OPTIM directive inside the Application.mk file:
APP_OPTIM := debug APP_PLATFORM := android-14 APP_STL := gnustl_static APP_ABI := armeabi armeabi-v7a
From android-ndk-r8d/docs/APPLICATION-MK.html file:
APP_OPTIM
This optional variable can be defined to either 'release' or
'debug'. This is used to alter the optimization level when
building your application's modules.
A 'release' mode is the default, and will generate highly
optimized binaries. The 'debug' mode will generate un-optimized
binaries which are much easier to debug.
Note that if your application is debuggable (i.e. if your manifest
sets the android:debuggable attribute to "true" in its <application>
tag), the default will be 'debug' instead of 'release'. This can
be overridden by setting APP_OPTIM to 'release'.
Note that it is possible to debug both 'release' and 'debug'
binaries, but the 'release' builds tend to provide less information
during debugging sessions: some variables are optimized out and
can't be inspected, code re-ordering can make stepping through
the code difficult, stack traces may not be reliable, etc...
相关推荐
使用Android NDK编译Android平台的eXosip库,有静态库和动态库。
arm平台下使用ndk工具交叉编译python,用于android系统;android-arm平台ndk交叉编译python
ubuntu下android ndk编译环境搭建,android应用程序开发,环境编译
Android NDK 交叉编译工具 Android NDK 交叉编译工具
最新版的live555 ,android的移植,大家瞧一瞧,看一看
详细的描述了Android NDK下编译ffmpeg开源库的步骤。
用Android_NDK编译FFmpeg,RTSP手机视频
live555 库 和 testRtspClient.cpp 编译生成静态库 和 可执行文件 testRtspClient 编译方法: 首先进入各个模块执行 Makefile,将静态库拷贝至上层目录 执行 ndk-build
Android ndk编译demo,在soxr的源码上完善了Android NDK的编译脚本,快速编译出需要的soxr
curl库源码添加了curl_config.h和mk文件,可以直接跳转到目录使用ndk-build编译出so库.
本文简要介绍了如何安装Android NDK的C/C++语言开发套件,并介绍了如何创建一个独立的ARM交叉编译工具链。通过该工具链接可以交叉编译Android上的C语言程序,也可以用来编译Android Linux内核。文中举例介绍了如何...
我已经在android-ndk-r5c 上成功编译成功,别且可以在平板上,对图片进行解析成文字文档
iperf 2 ,3 的android 平台移植笔记,ndk 选择,交叉编译工具链的编译和配置,编译结果的验证,常见错误的处理方法。工作实践中的总结。
NDK提供了一系列的工具,帮助开发者快速开发C(或C++)的动态库,并能自动将so和java应用一起打包成apk,并集成了交叉编译器,并提供了相应的mk文件隔离CPU、平台、ABI等差异,开发人员只需要简单修改mk文件
1、支持arm 2、支持aarch64
在ndk下编译的x264源码,已做修改,可以直接放在ndk下的samples目录下编译,该源码已经编译过,在libs目录下有libx264.so库,可以直接放在android下用
android ndk,双libs打包实例
利用ndk编译android的sh文件,利用该sh文件,能够正确编译出so文件
这个虽然只是个简单的jnidemo、但是涵盖了Android.mk 和Application.mk 的原理 重点是Android NDK编译的理解 mac 系统下 切换到jni目录,然后呢个 ndk-build
Android NDK 安装以及 HelloWorld!测试