Firebase crashlytics intergrated into the project, now I am facing gradle build errors which I didn't face before

I am trying to integrated FIrebase crashlytics to my unity project.
Unity Version: 2022.3.31f1
Firebase Version: firebase_unity_sdk_12.2.1

I imported these unity packages and followed the step shown in the documentation
FirebaseAnalytics
FirebaseCrashlytics

When I try to make a build I get build errors, I have attached the log errors that appear post build fail error.
I have downloaded the gradle separately and linked the external properties to it as well but nothing works. Version: 7.1.2

Any help is appreciated, thank you.

Error.txt (16.0 KB)
GradleError.txt (8.2 KB)
JAVA_Error.txt (16.0 KB)

Firebase is a big challenge to integrate but it can be done. :slight_smile:

Here’s some notes that might help you, including gradle-y stuff at the bottom:

How to troubleshoot build failures:

Obviously, if there is actionable data, clues or information within any of the errors, fix those problems. Each error entry may have more information than can fit in the console log so select each error and read the expanded view below it.

If that gives you nothing worthwhile (look to Google! You’re never the first one!), then…

First, make a blank project with a single blank scene and prove that it builds successfully.

If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

Until you can build a blank project to the target platform, don’t fiddle with anything else.

Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

Most often things that prevent building are third-party libraries such as Firebase.

Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

Android build not building:

Circa July 2022 here have been reports of Unity’s installer failing to install the Android Tools.

Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022 (edited on August 23, 2023 to include Android SDK 33…) (and again for SDK34):

Android Gradle errors and other related stuff:

Thanks for the response, I forgot to mention my project builds were successfully made without any hassle before importing firebase SDK.

I really appreciate the response, I will go through all of these and see what helps me.

Yep, no surprise. That’s exactly what I mean by “challenging.” I won’t write publicly what I think of the Firebase attempts to “be smart” and make its integration clever because it’s pretty obvious how those efforts have gone, judging just from the thousands of hours wasted trying to use it.

Good luck.

In addition to the above steps, try out Debugging the Game Build, Install and Run Process. and the EDM4U Usage Troubleshooting Guide.

The procedures will likely make figuring out what about your configuration could be changed to make progress.