Skip to content

Unity and Gradle build fails, after upgrading Firebase Analytics and Crashlytics to 6.16.0 (Program type already present: com.google.firebase.unity.BuildConfig ) #806

@roointan

Description

@roointan

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2018.4.22f1
  • Firebase Unity SDK version: 6.16.0
  • Source you installed the SDK: .unitypackage (.unitypackage or Unity Package Manager)
  • Problematic Firebase Component: build for android fails (Auth, Database, etc.)
  • Other Firebase Components in use: Analytics, Crashlytics, Dynamic Links (Auth, Database, etc.)
  • Additional SDKs you are using: Admob, Facebook, Onesignal (Facebook, AdMob, etc.)
  • Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)
  • Platform you are targeting: Android (iOS, Android, and/or desktop)
  • Scripting Runtime: IL2CPP (Mono, and/or IL2CPP)

[REQUIRED] Please describe the issue here:

I tried upgrading old crashlytics from 6.13 to 6.16, then android build started to fail, with this message: Program type already present: com.google.firebase.unity.BuildConfig on something related to multidex

Solution:

I changed AndroidManifest.xml files for FirebaseApp.androidlib and FirebaseCrashlytics.androidlib
they both had package="com.google.firebase.unity"
I changed one to package="com.google.firebaseapp.unity" and the other to package="com.google.firebasecrashlytics.unity"

This solved the problem for me.
I shared it here so that maybe it helps somebody, or the developers to prevent this bug, and also to be sure this solution is not having a side effect.
Thanks.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions