-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
We had the same issue on Unity 2019.4.10f1 right after upgrading Firebase Components to 6.16.0 from 6.15.2. Solution given has solved the problem. Differently from the @roointan, we've installed and upgraded the SDK from Package Manager. |
@melih-veloxia Happy this solved your problem, and happy it solved someone's problem so fast. I just posted this yesterday ;) |
thanks for fix, same, installed via packagemanager, multi-dex...trying the workaround otherwise we have to revert back |
Thanks for raising this issue, along side the workaround. We will look into it on our end, and see if we can get a proper fix in. |
Thanks for the fix, happened to me in 2019.3.0f3 when I upgraded Firebase from 6.8 to 6.16. Previous version was installed with .unitypackage, and I had migrated it to the Package Manager version |
Thanks for reporting this. And truly sorry this slipped through our release test. This seems to plague any Unity version from 2019 and below, if you turn on Minify. I have fixed this issue internally and will update this post when the release is available. |
I have Unity 2020 without Minify turned ON and also running into this issue, although not sure if entirely the same issue. My error is this:
|
2020.2 and same as above reply |
Exact same here for 2019.4.11f1. Was already desperate (as Android dependency resolution is kind of a miracle to me and I just knock on wood that it simply works ;-) ). Solution made my day!! |
Can confirm the problem and the solution fix it. Thank you! |
We were also using the .unitypackage versions when updating and did encounter this issue. As a solution attempt we updated to the package manager versions after deleting the other versions. But we can't find a Google Play Games Plugin version (that includes the namespace " PlayGamesPlatform") for the package manager so it still comes from Git we just disabled its Resolver when importing. (in case this somehow interfers) How ever the error persists. Unity 2019.4.12f1 Google Play Games Plugin for unity via GIT Solution for now: |
Did you try the workaround solution in the first post? |
I tried the solution but nothing changed and I search dependencies and I realized there are two different analytics dependencies one is firebase:17.0.0 the other is firebase-unity:6.16.0. So I delete the first one and I can build the project. I know that the first one comes from manual integration. But I didn not integrate it manually. I used external dependency manager. I examined dependecies xmls for each firebase services. In the xmls I see that these two packages are there. So I think something wrong with dependency xmls. |
@DavidZobrist Modifying AndroidManifest.xml as @roointan mentioned should resolve your issue with 6.16.0. @ynsmrkrkmz It seems like the AnalyticsDependencies.xml from older SDK was not removed. I would recommend you to remove the entire A quick update about this issue: we have put a patch for this and should be released pretty soon. Will keep this post updated. |
Thanks for fix @roointan, the solution worked for me! 😇 |
@WhoSV Glad it helped you 👍 |
|
@ynsmrkrkmz Based on the picture, your dependency lines looks perfectly fine to me. FYI, |
Moving to Package Manager helped me to solve mentioned problem although only in Development Build. Production build still gives me "Program type already present: com.google.firebase.unity.BuildConfig" issue. Anyone encountered that problem? Unity 2018.4.28f1, Unity SDK 6.16.0 with Crashlytics patched to 17.1.1 due to #798 // Edit: |
Hello @chkuang-g , Do you have an approximate ETA for the patch? I updated to 6.16.0 to fix this(#659) issue on iOS, but now Android builds crash. I would like to release a new version as soon as possible to fix an unrelated crash on iOS versions < 12.2 and I don't really want to release builds with workarounds as they always fail in some corner cases. Thank you, |
Do you have the log when it crashed on Android? We are brewing 6.16.1 release and will keep you updated. |
Hello |
Hello Did you restart after first run? reports are sent after a restart on app start. |
Yes i have tried that many times, but could not see any crash report on dashboard. |
|
@roointan Environment: Thanks! |
Assets/Plugins/Android/FirebaseCrashlytics.androidlib/AndroidManifest.xml |
I used the workaround of renaming the packages in those AndroidManifest.xml files and it worked to get a successful build. We are using Unity 2019.4.11f1 without minify. However, yesterday our production release got stuck with development (default) values because of a problem updating xml from google services json. What fixed that was deleting the Assets/Plugins/Android/Firebase/ folder, which had the old google-services.xml which was being used instead of the one in the Assets/Plugins/Android/FirebaseApp.androidlib/ folder. Thanks, roointan. And maybe this addendum will be helpful to someone in their firebase update experience. |
We just released 6.16.1 and this should be fixed. Please let us know if you are still running into this. |
Hey folks, in If you are experiencing this issue before upgrade, I would recommend you to delete Note that I'll close this issue for now. If you still experience the issue, please open a new ticket and reference to this one. Shawn |
We are getting the following error when trying to build with Firebase 6.16.1 (Unity 2020.1.10f1):
|
It looks like the same problem to this post. Did you try to remove |
@chkuang-g Yes, I resolved it but forgot to post it here. Thanks! |
[REQUIRED] Please fill in the following fields:
[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.
The text was updated successfully, but these errors were encountered: