Unity editor version: 2019.3.4f1
Firebase Unity SDK version: 6.12.0
Firebase plugins in use (Auth, Database, etc.): Analytics
Additional SDKs you are using (Facebook, AdMob, etc.): Mapbox SDK version: 2.1.1
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): Android
Scripting Runtime (Mono, and/or IL2CPP): Mono
-Install firebase
-Ensure Jetifier is enabled
-Ensure play services android resolver runs
-Build to Android
-See this Facebook SDK issue for pretty much the identical Unity logs: https://github.com/facebook/facebook-sdk-for-unity/issues/386
There are a lot of people discussing this issue who use the Facebook SDK and there seems to be a Facebook SDK patch available here (https://github.com/firebase/quickstart-unity/issues/438). Unfortunately I don't have the Facebook SDK in my project, but I am having pretty much the exact same error log as the Facebook SDK users.
To hack my way around the problem, I followed the suggestion on this post (https://github.com/facebook/facebook-sdk-for-unity/issues/386) which is to export the gradle from Unity and tinker with it in Android Studio. This works for now, but it seems super hacky and , as others have mentioned, it would be nice if you didn't have to export the project to tinker with the gradle.build and AndroidManifest files every time you want to build to Android.
Is it possible you're running into this missing feature https://github.com/googlesamples/unity-jar-resolver/issues/243 ?
The workaround is to disable patching mainTemplate.gradle
Is it possible you're running into this missing feature googlesamples/unity-jar-resolver#243 ?
The workaround is to disable patching
mainTemplate.gradle
Thanks for that, but disabling 'Patch mainTemplate.gradle' in 'Android Resolver Settings' didn't work unfortunately.
EDIT: This is a conflict with the Mapbox SDK as the Android plugin uses support-compat-25.1.0 and duplicate classes are found in the Firebase SDK at androidx.core.core-1.0.0
Ah good old Mapbox, see https://github.com/firebase/quickstart-unity/issues/525#issuecomment-561918880 then I recommend filing an issue with them to get them to use the Android Resolver rather than redistributing Java libraries like it's still the early 90s.
Thanks @stewartmiles . I noticed after I opened my issue here that Mapbox was out of date in that regards and I did open an issue with them (link above for anyone who stumbles into this issue in the future). I'll close this now as it's quite clear that Firebase is not the reason for this happening.
Hi, here is a fix that worked for me https://github.com/mapbox/mapbox-unity-sdk/issues/1564#issuecomment-599042720
Most helpful comment
Ah good old Mapbox, see https://github.com/firebase/quickstart-unity/issues/525#issuecomment-561918880 then I recommend filing an issue with them to get them to use the Android Resolver rather than redistributing Java libraries like it's still the early 90s.