Dear All,
I have a problem while building Android com.android.tools.r8.CompilationFailedException: Compilation failed to complete See the Console for details.
D8: Program type already present: com.google.firebase.unity.BuildConfig
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:136)
I used Firebase Analytics and Cloud Messaging. And there is not any problem. But when I added Crashlytics, my build becomes fails. When I remove crashlytics, no problem.
Also, proguard was chosen as minifier.
PS: Also as I mac user I could not run the Gradle command inside the project to get all logs properly. If any extra information please write to me.
Same also downgrading didn’t make it vanish anymore
: [Unity] ERROR: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
66: [Unity] ERROR: D8: Program type already present: com.google.firebase.unity.BuildConfig
67: [Unity] ERROR:
68: [Unity] ERROR: FAILURE: Build failed with an exception.
69: [Unity] ERROR:
70: [Unity] ERROR: * What went wrong:
71: [Unity] ERROR: Execution failed for task ':launcher:transformClassesWithMultidexlistForRelease'.
1 Like
ykdevvv
October 14, 2020, 11:23am
3
Firebase is the most used toolset, but after adding one of its packages without any customization our project becomes down. There is not any information about why crashlytics makes this.
opened 04:35PM - 04 Oct 20 UTC
closed 11:05PM - 21 Oct 20 UTC
type: bug
api: core
<!-- DO NOT DELETE
validate_template=true
template_path=.github/ISSUE_TEMPLATE… /issue.md
-->
### [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.
They know about the issue, and most bugs gets reported on that repo.