Closed Thortoco closed 2 weeks ago
Hi @Thortoco, thank you for reaching out. I tried reproducing the issue, however, I did not encounter the error.
This is my build.gradle file:
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.google.gms.google.services)
alias(libs.plugins.google.firebase.crashlytics)
}
android {
namespace '<name>'
compileSdk 34
defaultConfig {
applicationId "<name>"
minSdk 24
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
firebaseCrashlytics {
mappingFileUploadEnabled = true
nativeSymbolUploadEnabled = true
}
}
debug {
firebaseCrashlytics {
mappingFileUploadEnabled = true
nativeSymbolUploadEnabled = true
}
}
}
bundle {
language {
enableSplit = false
}
density {
enableSplit = true
}
abi {
enableSplit = true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.22.1'
}
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation libs.androidx.core.ktx
implementation libs.androidx.appcompat
implementation libs.material
implementation libs.androidx.constraintlayout
implementation libs.firebase.crashlytics
testImplementation libs.junit
androidTestImplementation libs.androidx.junit
androidTestImplementation libs.androidx.espresso.core
}
Did I miss anything?
I'm not sure if it's just a typo error, but, just to note, if you're using Groovy DSL, you should use the firebaseCrashlytics
extension. You can check this documentation for reference.
To add, the Crashlytics Gradle v3 plugin (3+) is a major version and modernizes the SDK by dropping support for lower versions of Gradle and the Android Gradle plugin. For more details, you can check this documentation.
Hello @lehcar09 thanks for your answer,
The main difference I see between our code is that on our side, we have minifyEnabled set to true in our build.gradle.
For the firebaseCrashlytics
, it's not a typo we use configure<CrashlyticsExtension>
as it is the recommended way in gradle.kts (as also mentioned in your documentation link).
I will try in an isolated project your setup.
Thank you for the clarification @Thortoco. I set the isMinifyEnabled to true, but, I still wasn't able to encounter the issue.
Can you share with me the Android Gradle plugin you're using?
Hello @lehcar09 I am using the 8.3.2
version of the gradle plugin com.android.tools.build:gradle
I just tried with 8.5.0
and I have the same error.
If any chance, can you share an MCVE to help us investigate the issue? If you're unable to provide one, can you try our quickstart app and see if you can reproduce the issue? Thanks!
Hey @Thortoco. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
I have the same issue, but only in my CI environment, in my dev machine it works.
Downgrading Firebase Crashlytics gradle from 3.0.x
to 2.9.9
solves the issue.
Can't share the project, but I'm using:
8.7
8.5.2
4.4.2
3.0.0
, 3.0.1
, 3.0.2
- none work, 2.9.9
worksThis is an old project, so the gradle files are in Groovy and use the old plugin application with buildscript
.
Not using bundles. Native symbol upload is enabled.
My CI env:
apt install openjdk-17-jdk
)My dev machine:
apt install openjdk-17-jdk
)In app/build/crashlytics/appName/dump_syms/
I see that a dump-syms.bin
file was generated, but in app/build/crashlytics/appName/nativeSymbols
I see only an empty file (libcrashlytics-common.soSOMENUMBERS.tmp
).
Hello If I can jump on what you said @cymerio the issue also only happens on our CI that is configured as such:
So the same configuration as you for your dev machine but still we have the issue. Could it be something missing on the CI env that would lead to this build issue?
Hey @Thortoco. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@Thortoco if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Hello, after updating our CI to the latest ubuntu LTS 24.04 we don't have the issue anymore.
Hello again. I have an update. The build failure disappeared when I migrated the Groovy scripts to Kotlin.
And I also have repro steps:
gradle/libs.versions.toml
:
google-services = { id = "com.google.gms.google-services", version = "4.4.2" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "3.0.0" }
build.gradle
:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.google.services) apply false // add this
alias(libs.plugins.firebase.crashlytics) apply false // add this
}
app/build.gradle
, add and apply the plugins, enable nativeSymbolUploadEnabled
and add an externalNativeBuild
, like this:
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.google.services) // add this
alias(libs.plugins.firebase.crashlytics) // add this
}
android { // ... buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' firebaseCrashlytics { // add this nativeSymbolUploadEnabled = true // add this } // add this } } externalNativeBuild { // add this cmake { // add this path "src/main/cpp/CMakeLists.txt" // add this } // add this } // add this // ... }
5. Create `app/src/main/cpp/CMakeLists.txt`:
project(test) cmake_minimum_required(VERSION 3.4.1) add_library(mylib SHARED mylib.c)
6. Create `app/src/main/cpp/mylib.c`:
void mylib_func() { printf("Hello, World!\n"); }
7. Put the `google-services.json` in `app/src/google-services.json`
8. Run `./gradlew clean assembleRelease uploadCrashlyticsSymbolFileRelease`
(the task that triggers the failure is `uploadCrashlyticsSymbolFileRelease`)
So, basically it's reproduced with the most minimal example that has the build scripts in Groovy and has native code. But it's only triggered in an old system.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
When running the command to bundle our application, we get the following error:
We launch the following command to bundle our application:
This issue happens when trying to bump the firebase BOM from
32.8.1
to33.1.2
. While doing this change we also bump the following dependencies:3.2.0
to5.0.0
2.9.9
to3.0.2
4.3.15
to4.4.2
Relevant Code:
In our app
build.gradle
this is ourCrashlyticsExtension
configurationand our bundle split
Thanks