I have an Android project which includes native libraries (.so). I have integrated firebase crashlytics into my project. I am able to get crash dump for the Java crashes in firebase crashlytics. However, in case of native crashes - the stack trace is missing For example - it is something like:
Crashed: Thread: SIGSEGV 0x0000000003000000
at (Missing)()
at (Missing)()
at (Missing)()
at (Missing)()
at (Missing)()
I have added the debug and release version of the native libs inside the folder app/src/main/obj and app/src/main/libs respectively The relevant portion of the app build.gradle is:
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj/'
androidNdkLibsOut 'src/main/libs/'
//manifestPath 'src/main/AndroidManifest.xml'
}
I upload the native symbols using the command
./gradlew crashlyticsUploadSymbolsRelease
which returned success (the build variant of my application is Release). I also did
./gradlew crashlyticsUploadSymbolsDebug
just to be sure, but that also didn't help.
So my questions are:
Is there some step which I am missing?
How can I debug and fix this?
Do not forget to check the verbose output of the command ./gradlew crashlyticsUploadSymbolsRelease --debug
. It must show message like Crashlytics symbol file uploaded successfully
. If it is not the case, check the surrounding messages that could indicate the root cause.
This was not sufficient in my case, and to fix the issue, I followed an advice found here : I set android:extractNativeLibs
to true
in the AndroidManifest.xml
file.
<application
android:extractNativeLibs="true"
...
</application>
Note that this settings has an impact on the apk size and its installation size as explained here: Setting android:extractNativeLibs=false to reduce app size
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.