Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specified path for unstripped native libs is not a directory - generateCrashlyticsSymbolFileRelease

How I can define androidNdkOut and androidNdkLibsOut paths with new Firebase Crashlytics SDK?

When I try to run: ./gradlew clean assembleRelease uploadCrashlyticsSymbolFileRelease

I get next error:

Execution failed for task ':app:generateCrashlyticsSymbolFileRelease'.
> java.io.IOException: Specified path for unstripped native libs is not a directory: /Users/martin/repos/example-app-android/app/obj

If I manually move all my NDK libs to ./app folder I get the same error with different path:

Execution failed for task ':app:generateCrashlyticsSymbolFileRelease'.
> java.io.IOException: Specified path for stripped native libs is not a directory: /Users/martin/repos/example-app-android/app/build/intermediates/transforms/stripDebugSymbol/release

In this second case the build command sometimes fails, sometimes not.

This issue started to appear after I moved from Fabric Crashlytics plugin to Firebase Crashlytics plugin. In the Fabric case, I had the option to define: androidNdkOut and androidNdkLibsOut paths. Is that missing in the new Firebase plugin?

Relevant Code:

Old code example:

    crashlytics {
        enableNdk true
        androidNdkOut "$buildDir/ndklibs/obj"
        androidNdkLibsOut "$buildDir/ndklibs/libs"
    }

New Code example:

            firebaseCrashlytics {
                nativeSymbolUploadEnabled true

            }
like image 571
kocjan Avatar asked Feb 05 '20 09:02

kocjan


1 Answers

I got answer on this link in a meantime: https://github.com/firebase/firebase-android-sdk/issues/1199#issuecomment-584680918

In the new Firebase Crashlytics plugin, the androidNdkOut and androidNdkLibsOut properties have been changed to strippedNativeLibsDir and unstrippedNativeLibsDir, and should be declared in firebaseCrashlytics within the variant block, where you declared nativeSymbolUploadEnabled true.

There is still the issue with the paths itself, you need to set relative paths for the strippedNativeLibsDir and unstrippedNativeLibsDir to your /app directory. Example: https://github.com/firebase/firebase-android-sdk/issues/1199#issuecomment-585262965

like image 59
kocjan Avatar answered Oct 24 '22 23:10

kocjan