How can I obtain the SDK stack traces?
Products / Plugins:AI Effects
Platform / Framework:iOS / Android / macOS
Last updated:2021-09-26 15:22
Follow these procedures to obtain the SDK stack traces for different platforms.
Android
Analyze logs in real time
adb logcat | ndk-stack -sym $PROJECT_DYNAMIC_LIB_PATH
Note:
$PROJECT_DYNAMIC_LIB_PATH
is the path to the dynamic library directory (where the.so
files are located) of the target ABI (armeabi
,armeabi-v7a
, orarm64-v8a
).
For example:
adb logcat | ndk-stack -sym /path/to/your/project/armeabi-v7a
Analyze the log files after obtaining them
Use
adb logca
to save the log files, and then analyze them by usingndk-stack
.adb logcat> xx.log
ndk-stack -sym $PROJECT_DYNAMIC_LIB_PATH -dump $LOG_FILE
Note:
$PROJECT_DYNAMIC_LIB_PATH
is the path to the dynamic library directory (where the.so
files are located) of the target ABI (armeabi
,armeabi-v7a
, orarm64-v8a
).$LOG_FILE
is the name of the output log file.
For example:
adb logcat> crash.log
ndk-stack -sym /path/to/your/project/armeabi-v7a -dump crash.log
iOS/iPadOS
Connect your iOS device to the Mac.
Open Xcode, and select Window > Devices and Simulators on the menu bar.
Select your device on the left pane, click View Device Logs.
Select the log entries that meet the following criteria:
a. Process is your application name.
b. Type is crash.
c. Date/Time is in the time period when the crash happened.
Right-click the log entry and select Export Log, and save the log details as a
.crash
file as prompted.
macOS
Go to ~/Library/Logs/DiagnosticReports, and the stack traces are in the files that end with the suffix
.crash
.