Important: Please read the Qt Code of Conduct -

Crashlytics for mobile apps in Qt

  • Hey there :D

    I wanted to add Crashlytics to my Qt Project (for now only for Android) but stumbled across some issues :/

    Seems like, I am not the first one having troubles,
    but I didn't manage to find a solution that works :/

    @RonaldoD I found your post, back from 2015. I know, that's a little outdated, but I was wondering, if you have some useful hints? Sadly, the website I not available anymore :(
    Re: Integrate Qt Android Application with Crashlytics Tools

    What I managed so far, was the integration of the Firebase Crashlytics SDK from google (not the "old" Fabric SDK)
    for the native android java side, essential code below:

    apply plugin: ''
    dependencies {
        // Add the Firebase SDK for Crashlytics.
        //implementation '' // old fabric
        implementation ''
        // Add the Crashlytics NDK dependency.
        //implementation ''

    which seems to work for exceptions and logging on the android side

    mFirebaseCrashlytics.log("crashing!"); // log error
    try {
        throw new RuntimeException("Test Crash");
    } catch (Exception exc) {
        mFirebaseCrashlytics.recordException(exc); // capture Android stack trace

    But if the App really crashes, it seems that there is no stack trace available in my Crashlytics reports.
    Application output from Qt Creator is something like this

    #30 pc 0023c840  /data/app/ (void QJNIObjectPrivate::callStaticMethodV<void>(_jclass*, char const*, char const*, char*)+72)
    #31 pc 0023c8be  /data/app/ (void QJNIObjectPrivate::callStaticMethod<void>(_jclass*, char const*, char const*, ...)+58)
    #32 pc 00023b50  /data/app/ (???)
    No pending exception expected: java.lang.RuntimeException: forced runtime exception
    at void (

    I am not really familiar with the Qt / depending mobile platform build systems,
    but I assume I need to add the Crashlytics NDK to be able to capture the cpp/Qt stack trace?

    But as soon, as I am adding :firebase-crashlytics-ndk:17.0.0-beta03 in the Gradle dependencies, my app crashes at startup:

    I System.out: java: 15:26:50.GMT+02:00 > Android onCreate() hit in
    W System  : ClassLoader referenced unknown path:
    W System.err: java.lang.ClassNotFoundException: Didn't find class "" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /system/product/lib]]
    W System.err: 	at dalvik.system.BaseDexClassLoader.findClass(
    W System.err: 	at java.lang.ClassLoader.loadClass(
    W System.err: 	at

    Following the guidelines from I found that I need to

    • Run the following NDK-specific Gradle tasks:
      ./gradlew app:assembleBUILD_VARIANT
      ./gradlew app:uploadCrashlyticsSymbolFileBUILD_VARIANT

    But I do not know, where / when to put these?

    Also I don't really understand

    Step 3 (optional): Upload symbols for external dependencies

    What are "stripped libraries", how do I know which I need and where to find them?

    Is there anyone with more experience, who can help me with this topic? :D
    Any help is appreciated!

    best Regards

  • ok, still don't know what exactly are unstripped / stripped libs are,
    but I managed to get basic NDK reports running :D

    the mentioned gradlew app:uploadCrashlyticsSymbol goes into the build.gradle file within the android tag:

    afterEvaluate {

    other settings can be taken from the official sdk documentation found here

  • I managed to achieve one step further to my goal :D

    The 'libs' folder is generated during compilation, which contains the depending .so files,
    which I was able to include with relative paths, from the build directory:

    buildTypes {
            release {
                // When minifyEnabled is set to true, Crashlytics automatically
                // uploads mapping files because the plugin detects that obfuscation
                // is enabled. mappingFileUploadEnabled defaults to true if
                // minifyEnabled is true.
                minifyEnabled true
                firebaseCrashlytics {
                    //mappingFileUploadEnabled true
                    // Enable processing and uploading of native symbols to Crashlytics
                    // servers. By default, this is disabled to improve build speeds.
                    // This flag must be enabled to see properly-symbolicated native
                    // stack traces in the Crashlytics dashboard.
                    nativeSymbolUploadEnabled true
                    strippedNativeLibsDir '/libs'
                    unstrippedNativeLibsDir '/libs'

    Although the full compilation now takes about 28 minutes on my machine, at least I am able to compile and deploy the application on my test devices (Emulator and Nexus 10 :D)

    But if I open the application on my device, it immediately crashes xD

    D/libcrashlytics(19474): Initializing native crash handling successful.
    I/FirebaseCrashlytics(19474): Crashlytics NDK initialization successful
    W/System.err(19474): java.lang.ClassNotFoundException: Didn't find class "" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
    W/System.err(19474): 	at dalvik.system.BaseDexClassLoader.findClass(
    W/System.err(19474): 	at java.lang.ClassLoader.loadClass(
    W/System.err(19474): 	at java.lang.ClassLoader.loadClass(

Log in to reply