使用ndk-stack定位崩溃
Android NDK自从版本R6开始, 提供了一个工具ndk-stack( 在目录{ndk_root}/中 ). 这个工具能自动分析dump下来的crash log, 将崩溃时的调用内存地址和c++代码一行一行对应起来.
执行命令ndk-stack --help
Usage:
ndk-stack -sym <path> [-dump <path>]
-sym Contains full path to the root directory for symbols.
-dump Contains full path to the file containing the crash dump.
This is an optional parameter. If ommited, ndk-stack will
read input data from stdin
- -dump参数很容易理解, 即dump下来的log文本文件.
ndk-stack会分析此文件. - -sym参数就是你android项目下,编译成功之后,
obj目录下的文件.

浙公网安备 33010602011771号