1

I am using ...

  • com.google.firebase:firebase-crashlytics-ndk:17.3.1
  • com.google.firebase:firebase-crashlytics-gradle:2.4.1
  • com.google.gms:google-services:4.3.5

... in my Android application project which depends on a Android library project. The library project uses both Kotlin and C-Code. The library build process outputs an *.aar with unstripped *.so files. When I build the application project I can verify that the unstripped *.so files of the library are unpacked into app/build/intermediates/merged_native_libs/<BuildVariant>/out/lib and that they are still unstripped.

The app is configured with the build flavors free and paid and the usual build types debug and release.

First, I assemble the APK via ./gradlew clean assembleFreeDebug.

Then, I invoke ./gradlew generateCrashlyticsSymbolFileFreeDebug which fails:

Execution failed for task ':app:generateCrashlyticsSymbolFileFreeDebug'. Unstripped native library path required by generateCrashlyticsSymbolFileFreeDebug does not exist: app\build\intermediates\merged_native_libs\PaidDebug\out\lib. Check your configuration, or override using the firebaseCrashlytics.unstrippedNativeLibsDir extension property.

Is this a bug where build flavors are mixed up by the Gradle plugin or a misconfiguration on my side?

I can workaround it if I also assemblePaidDebug without clean. Then, symbol files are generated by generateCrashlyticsSymbolFileFreeDebug in app/build/crashlytics. I am however not sure if it is a good idea to mix the input files (flavors) to generate the *.cSYM files.

Related

JJD
  • 50,076
  • 60
  • 203
  • 339

1 Answers1

1
  1. try to remove unstrippedNativeLibsDir. If you are building C++ code as part of your app build and not in library, crashlytics should find necessary path automatically
  2. if it's still not working and you're using cmake for build try tu use this path: ./build/intermediates/cmake/release/obj
Boris
  • 196
  • 3
  • I am not building C++ code as part of the application build. The library is a separate build in a standalone library project. – JJD Mar 30 '21 at 17:52
  • That's the same setup as I have. then you can use path like that : unstrippedNativeLibsDir '../lib/build/intermediates/cmake/release/obj' – Boris Mar 31 '21 at 06:23