Crashlytics NDK support multi androidNdkOut

I use Fabric Crashlytic to ensure the performance of my own code. I have a multi.so library in an application project project and a jar library. In my build.gradle application, here it is:

crashlytics { enableNdk true androidNdkOut '<myJarProjectPath>/src/main/obj' //or src/main/obj androidNdkLibsOut '<myJarProjectPath>/src/main/jniLibs' //or src/main/jniLibs } 

then I use "crashlyticsUploadSymbolsXXXXRelease" to package my application and get ntk crash stacktrace in Fabric. But I can only configure one of these .so libraries. I wonder if using "crashlyticsUploadSymbolsXXXXRelease" to get Apk, what will happen to .so in the jar library project? Does anyone know how to support ndk crashlytics both in a project project and in a jar library project?

+2
source share
1 answer

Matt from Crashlytics is here!

UPDATE

Starting with version 1.23.0 , the Fabric plugin supports automatic path detection for native binaries when using the Android plugin for Gradle 2.2.0+ with DSL externalNativeBuild . If you use this, you should simply remove the androidNdkOut and androidNdkLibsOut from your crashlytics block.


We currently do not have support for defining multiple directories for your native libraries. However, a very simple solution for this is to define a Gradle task that copies your debug and release.so files from both projects to a common temporary directory (e.g. temp/ndkout/ ... and temp/ndklibsout/ ) and then sets your androidNdkOut properties and androidNdkLibsOut for these directories.

One note: you will need to maintain an architecture-specific folder structure in every directory directory! Here is a complete example to give you an idea:

 temp/ -- ndkout/ -- armeabi -- libappproject.so -- libjarproject.so -- x86 -- libappproject.so -- libjarproject.so ... -- ndklibsout/ -- armeabi -- libappproject.so -- libjarproject.so -- x86 -- libappproject.so -- libjarproject.so ... 
+4
source

Source: https://habr.com/ru/post/1258481/


All Articles