I am trying to add Crashlytics support to my Android project which uses NDK and gradle CMake. This means that I need symbols for my common projects. Therefore, if I want to create characters for the release build, I will call gradlew crashlyticsUploadSymbolsRelease
The official document https://docs.fabric.io/android/crashlytics/ndk.html says that the process of generating and loading symbols assumes a standard project structure: src / main / obj for debug binaries and src / main / libs for executable files releases created by ndk-build.
In the gradle file, this means a new block that looks like this:
crashlytics { enableNdk true androidNdkOut 'src/main/obj' androidNdkLibsOut 'src/main/libs' }
Since I use CMake gradle integration to create my native libraries, the default paths certainly don't work. My native libraries in release mode are built into the build/intermediates/cmake/release/obj directory, and in debug mode they go to the build/intermediates/cmake/debug/obj directory.
From trial and error, I realized that if I want my build version to work, I will have to put the path to the source libraries of the release mode on both lines, as shown below.
crashlytics { enableNdk true androidNdkOut 'build/intermediates/cmake/release/obj' androidNdkLibsOut 'build/intermediates/cmake/release/obj' }
I just do not understand the difference between the androidNdkOut and androidNdkLibsOut , because at least in my script they point to the same directory. Fortunately, this is not a problem for me, because I just need Crashlytics to work with my versions.
So my questions are:
1) Actually the difference between androidNdkOut and androidNdkLibsOut ? Why can't I put the path to my debug binaries in one path and the path to release binaries for another? A concrete example would be nice in addition to the explanation.
2) How do I change the gradle file if at some point I want to include characters for my debug libraries? gradlew crashlyticsUploadSymbolsRelease this mean that the gradlew crashlyticsUploadSymbolsRelease as well as the gradlew crashlyticsUploadSymbolsDebug will work?
This is stated in the streams Symbols Crashlytics NDK and gradle tasks and Crashlytics NDK multi androidNdkOut support path , but they really do not answer these two questions.