[CrashlyticsPlugin] "Unstripped native library path does not exist" because check is done before the "assembleRelease" task creates it (with plugin version 2.9.3 and 2.9.4)
My application, using a native library, is configured to upload debug symbols on Firebase Crashlytics.
Here is its configuration:
android {
buildTypes {
release {
configure<com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension> {
nativeSymbolUploadEnabled = true
strippedNativeLibsDir = "$buildDir/intermediates/stripped_native_libs/release/out/lib"
unstrippedNativeLibsDir = "$buildDir/intermediates/merged_native_libs/release/out/lib"
Problem:
Starting from firebase-crashlytics-gradle version 2.9.3
, when I do an "assembleRelease" (because I configured the plugin in release) without a previous build cache, I got the following error after a few seconds:
Unstripped native library path does not exist: /app/build/intermediates/merged_native_libs/release/out/lib. Either specify the correct unstrippedNativeLibsDir or disable Crashlytics symbol uploading.
It worked with previous plugin versions (we previously used version 2.9.2
.
It seems the existence of a directory at the targeted path is now done before the "assembleRelease" process and before creating such a directory.
I now have to:
disable the plugin nativeSymbolUploadEnabled = false
build my release
re-enable the plugin nativeSymbolUploadEnabled = true
Before executing the Gradle task to upload native symbols.
Gradle task injectCrashlyticsBuildIdsRelease fails with code -5 starting from plugin version 2.9.3
#4720
Hi, I just want to add my own findings.
I have encountered this issue with 2.9.4 as well. It seems to me that it tries to include 'build/intermediates/merged_native_libs/release/out/lib' before its actually built them.
If I run 2.9.2, it will build the project as thought I ran npm run android
, but for release and generate a release variant of the relevant intermediate files.
But if I run 2.9.4 it fails and informs me that the file could not be found which makes sense because its not been built.
[🐛] 🔥 Crashlytics throws proxy error when compiling Android release build with proguard enabled
invertase/react-native-firebase#7000