I have the following errors on compile:
Error: [Temp/StagingArea/AndroidManifest-main.xml, /Users/AlexBo/Development/Unity Projects/Boozee/Temp/StagingArea/android-libraries/com.google.firebase.firebase-iid-16.0.0/AndroidManifest.xml:11] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Error: [Temp/StagingArea/AndroidManifest-main.xml, /Users/AlexBo/Development/Unity Projects/Boozee/Temp/StagingArea/android-libraries/com.google.firebase.firebase-measurement-connector-impl-16.0.1/AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
@AlekseiBo which Unity version are you using and which SDK are you using? We fixed (i.e worked around) an issue with manifest merging in Unity 2018 in our most recent release (Firebase Unity SDK 5.2.0).
@lluma mentioned on #175 they're having the same issue as well.
In both cases, do you have issues building our sample applications? I recommend starting there and looking at differences between your game project and our samples (which should work) then slowly narrowing down the differences. For example, if you're using other plugins in your project they could be causing problems.
@stewartmiles i have the same problem. I use Unity 5.6.5p4, Firebase 5.2.0
I resolve problem by this method: I extract 3 aar files above and move this tag **
<service android:name="com.google.firebase.components.ComponentDiscoveryService">
<!--com.google.firebase.firebase-iid-->
<meta-data
android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<!--com.google.firebase.firebase-measurement-connector-impl-->
<meta-data
android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<!--com.google.firebase.firebase-auth-->
<meta-data
android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
</service>
I run application on device with logcat warning like bellow but FirebaseApp.CheckAndFixDependenciesAsync() still return DependencyStatus.Available. @stewartmiles Will Firebase work correctly when i merged AndroidManifest like above?
Logcat Warning:
08-01 10:11:47.294: W/ComponentDiscovery(1223): Class com.google.firebase.auth.FirebaseAuthRegistrar is not an found.
08-01 10:11:47.294: W/ComponentDiscovery(1223): java.lang.ClassNotFoundException: com.google.firebase.auth.FirebaseAuthRegistrar
08-01 10:11:47.294: W/ComponentDiscovery(1223): at java.lang.Class.classForName(Native Method)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at java.lang.Class.forName(Class.java:400)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at java.lang.Class.forName(Class.java:326)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.google.firebase.components.zzc.zza(SourceFile:63)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.google.firebase.components.zzc.zza(SourceFile:56)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.google.firebase.FirebaseApp.<init>(SourceFile:496)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.google.firebase.FirebaseApp.initializeApp(SourceFile:324)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.google.firebase.FirebaseApp.initializeApp(SourceFile:294)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.google.firebase.FirebaseApp.initializeApp(SourceFile:281)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.google.firebase.provider.FirebaseInitProvider.onCreate(SourceFile:37)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.google.firebase.provider.FirebaseInitProvider.attachInfo(SourceFile:31)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.app.ActivityThread.installProvider(ActivityThread.java:5951)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.app.ActivityThread.installContentProviders(ActivityThread.java:5533)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5472)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.app.ActivityThread.-wrap2(ActivityThread.java)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1583)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.os.Handler.dispatchMessage(Handler.java:102)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.os.Looper.loop(Looper.java:241)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at android.app.ActivityThread.main(ActivityThread.java:6217)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at java.lang.reflect.Method.invoke(Native Method)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
08-01 10:11:47.294: W/ComponentDiscovery(1223): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.FirebaseAuthRegistrar" on path: DexPathList[[zip file "/data/app/com.nzt.diablo.legends-1/base.apk"],nativeLibraryDirectories=[/data/app/com.nzt.diablo.legends-1/lib/arm, /data/app/com.nzt.diablo.legends-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
08-01 10:11:47.294: W/ComponentDiscovery(1223): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
08-01 10:11:47.294: W/ComponentDiscovery(1223): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
08-01 10:11:47.294: W/ComponentDiscovery(1223): ... 24 more
08-01 10:11:47.296: W/ComponentDiscovery(1223): Class com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar is not an found.
08-01 10:11:47.296: W/ComponentDiscovery(1223): java.lang.ClassNotFoundException: com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar
08-01 10:11:47.296: W/ComponentDiscovery(1223): at java.lang.Class.classForName(Native Method)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at java.lang.Class.forName(Class.java:400)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at java.lang.Class.forName(Class.java:326)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.google.firebase.components.zzc.zza(SourceFile:63)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.google.firebase.components.zzc.zza(SourceFile:56)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.google.firebase.FirebaseApp.<init>(SourceFile:496)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.google.firebase.FirebaseApp.initializeApp(SourceFile:324)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.google.firebase.FirebaseApp.initializeApp(SourceFile:294)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.google.firebase.FirebaseApp.initializeApp(SourceFile:281)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.google.firebase.provider.FirebaseInitProvider.onCreate(SourceFile:37)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.google.firebase.provider.FirebaseInitProvider.attachInfo(SourceFile:31)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.app.ActivityThread.installProvider(ActivityThread.java:5951)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.app.ActivityThread.installContentProviders(ActivityThread.java:5533)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5472)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.app.ActivityThread.-wrap2(ActivityThread.java)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1583)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.os.Handler.dispatchMessage(Handler.java:102)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.os.Looper.loop(Looper.java:241)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at android.app.ActivityThread.main(ActivityThread.java:6217)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at java.lang.reflect.Method.invoke(Native Method)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
08-01 10:11:47.296: W/ComponentDiscovery(1223): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" on path: DexPathList[[zip file "/data/app/com.nzt.diablo.legends-1/base.apk"],nativeLibraryDirectories=[/data/app/com.nzt.diablo.legends-1/lib/arm, /data/app/com.nzt.diablo.legends-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
08-01 10:11:47.296: W/ComponentDiscovery(1223): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
08-01 10:11:47.296: W/ComponentDiscovery(1223): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
08-01 10:11:47.296: W/ComponentDiscovery(1223): ... 24 more
I try to use Firebase along with ARCore plugin. And I have a feeling that's the case, but I don't know how to resolve it or to whom to address.
@exzizt FYI
@trinhvietvan hacking the manifests is very likely to not work, the set of warnings you're seeing suggests the services we expected to start are not running as expected.
@AlekseiBo I'm not sure what state the ARCore plugin is in but I think they're using https://github.com/googlesamples/unity-jar-resolver like Firebase.
Everyone, if you've integrated another plugin with Firebase I recommend pulling the latest https://github.com/googlesamples/unity-jar-resolver and force resolving your dependencies. Definitely start with one of our sample projects (in this repo) to see whether things work then look at the delta from there between your project.
Once thing to note is that we rewrite the AndroidManifest.xml in the plugin to expand all ${applicationId} variable references. So if you change the bundle ID and build without resolving again you'll end up in a bad state. If you have auto-resolution enabled in the Android Resolver it will kick off resolution after ~3 seconds to update the bundle ID in each manifest.
I have updated Android SDK and everything works fine now. Thank you.
@AlekseiBo can you share your Android SDK version, build tool version, ...
I have updated Android SDK too, but problem still exist :(
I am using Mac and I have the same version as you, and it started to work after I have upgraded to Unity 2018.2
Hi any fix on this issue ?
I am facing the same issue on unity2018.2.2 and Latest Firebase 5.2 sdk.
Thanks
We released a new version of the Android Resolver today that may help with this https://github.com/googlesamples/unity-jar-resolver/blob/master/play-services-resolver-1.2.82.0.unitypackage
What would be really useful would be to share a sample project that is failing to build and attach the complete unity log file to the issue. We haven't been able to reproduce this issue internally with our sample applications using the 5.2.0 SDK.
I tried new version of resolver, and it still does not work. Unity 2017.4.6f1
@elusiven we need Unity's logs and a test project to see what is happening here. Saying it doesn't work is a useful, but not enough to reproduce the failure, debug and fix it.
Any chance you could reproduce the failure with one of our sample projects in this repo then share the project and the logs with us?
FYI: We just released 5.2.1 which includes the latest resolver. Please give it a try:
https://firebase.google.com/support/release-notes/unity#5.2.1
If you're still having issues please post example projects and Unity logs (https://docs.unity3d.com/Manual/LogFiles.html) here.
I use Unity 5.6.5p4 with Firebase SDK 5.2.1 (Analytics, Auth, Database, Messaging, Remote Config, Dynamic Link) the problem is gone 馃憤
I have the problem with unity 5.6.5f1 and Firebase SDK 5.2.1. Please help to check and resolve issue.
Thank you!
error log:
CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_144\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/android-sdktools" -Dfile.encoding=UTF8 -jar "E:\Unity\5.6.5\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Toolssdktools.jar" -
stderr[
Error: [TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.google.firebase.firebase-measurement-connector-impl-16.0.1\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
-- @android:name="com.google.firebase.components.ComponentDiscoveryService">
--
++
]
stdout[
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.appcompat-v7-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.cardview-v7-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.customtabs-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.support-compat-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.support-core-ui-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.support-core-utils-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.support-fragment-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.support-media-compat-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.support-v4-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.android.support.support-vector-drawable-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\myfolder\TempStagingArea\android-libraries\com.google.firebase.firebase-analytics-impl-16.1.1\AndroidManifest.xml:12] Skipping identical /manifest/application/receiver[@name=com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver] element.
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()
@techntt could you share a project that demonstrates the problem?
Unity 2018.2.3f1 and Firebase SDK 5.2.1. Same issue.
I have created empty project.
Import FirebaseDatabase.unitypackage.
Set Target Architecture to ARMv7. Off "Split APKs by target architecture".
Run "Android Resolver"->"Force resolve".
In console was warning message:
Some conflicting dependencies were found.
The following dependency versions were modified:
com.google.firebase:firebase-auth:16.0.3 --> com.google.firebase:firebase-auth:16.0.3+
com.google.firebase:firebase-common:16.0.1 --> com.google.firebase:firebase-common:16.0.0+
com.google.firebase:firebase-core:16.0.1 --> com.google.firebase:firebase-core:16.0.1+
com.google.firebase:firebase-database:16.0.1 --> com.google.firebase:firebase-database:16.0.1+
Try to build android APK:
"Unable to merge android manifess".
Console errors:
Error: [TempStagingArea\AndroidManifest-main.xml, E:\Unity\Projects\Test\Firebase2018_08\TempStagingArea\android-libraries\com.google.firebase.firebase-iid-16.0.0\AndroidManifest.xml:11] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
Error: [TempStagingArea\AndroidManifest-main.xml, E:\Unity\Projects\Test\Firebase2018_08\TempStagingArea\android-libraries\com.google.firebase.firebase-measurement-connector-impl-16.0.1\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
CommandInvokationFailure: Unable to merge android manifests.
C:/Program Files/Java/jdk1.8.0_91\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/AndroidSDK/android-sdk_r23.0.2-windows/android-sdk-windowstools" -Dfile.encoding=UTF8 -jar "E:\Unity\UnityHub\Editors\2018.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer/Toolssdktools.jar" -
stderr[
Error: [TempStagingArea\AndroidManifest-main.xml, E:\Unity\Projects\Test\Firebase2018_08\TempStagingArea\android-libraries\com.google.firebase.firebase-iid-16.0.0\AndroidManifest.xml:11] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
Error: [Temp\StagingArea\AndroidManifest-main.xml, E:\Unity\Projects\Test\Firebase2018_08\Temp\StagingArea\android-libraries\com.google.firebase.firebase-measurement-connector-impl-16.0.1\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
]
Same problem here, Unity 2018.2.5 and Firebase 5.2.1
_Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:_
All, we need an example that reproduces this issue.
We validate prior to each release and test on a regular basis. So what we need from someone who is experiencing this:
The whole project??? That would be a HUGE upload.
Unity version: 2018.2.5f1
Unity build settings for Android: Which specific settings?
Android SDK version: Minimum API Level 16
Host operating system version: Windows 10
Extra info: using the latest versions of the official GooglePlayGames plugin and GoogleMobileAds plugin.
The project used to build just fine before adding the Unity Firebase plugin (specifically the FirebaseAnalytics). Still builds fine on iOS.
@GrafosGames one of our sample projects (in this repo) that demonstrates the issue. I'm certainly not asking folks to upload their game projects to a public github issue.
Obviously, I assumed you meant through some private space that would be agreed upon
@stewartmiles
Url to zip with project: http://take.ms/LR4gi
It's just an empty project with imported FirebaseDatabase.unitypackage
When try to build apk with "Internal' build system it's show error "Unable to merge android manifests".
Unity 2018.2.3f1 and Firebase SDK 5.2.1
Windows 7
Detailed log of error in previous comment: https://github.com/firebase/quickstart-unity/issues/192#issuecomment-414872626
Hi all, after i switch to build project with Gradle (Unity 5.5.6f1, Firebase SDK 5.2.1), the issue is ignore and build successfully.
@Pretzel777 thanks for sharing the project. I was able to build it successfully on our test machines with Unity 2018.2.3f1, Firbease SDK 5.2.1 on OSX and Windows 10 though.
I noticed the build log in comment referenced the Android SDK tools directory so I downloaded some older versions of the tools package into my Android SDK and ... voila .. build error.
So the Android SDK tools package version 25.2.5 fails to build the latest Firebase SDK and 26.1.1 (latest) works fine.
So you should update your Android SDK tools package and while you're at it, probably worth updating everything else that is out of date as well.
Now I don't know about the rest of you, but an error message like Could not merge Android manifests, try updating your Android SDK tools would be preferable. From what I can tell this is coming from the sdktools.jar authored by Unity so it looks like that needs some love.
@stewartmiles thanks! Finally it's works! :)
But in SDKManager it's wasn't any updates for Android SDK tools. In Android Studio I open settings and found updates available to 26.1.1 .
Thanks, Stewart, your suggestion solved it for me too. As Pretzel777 mentions, you have to go through Android Studio for the update, it's not shown on the SDKManager
Great, I've filed a bug for the SDKManager issue https://issuetracker.google.com/issues/113152008 I'm glad this resolved the problem.
yes, SDK Manager won't show version 26.1.1 for Android SDK tools.
You need to download Android Studio (if you do not have it) and update there. This solved the merge issue for me to discover new errors not related to the merge :)
Note that after installing Android Studio - SDK Manager stopped work.
Sorry for the inconvenience caused, but I'm using Unity 5.6.0f3 as Unity 2017 and 2018 do not work well here.
I am trying to build a scene based from the following link: https://www.youtube.com/watch?v=bD8Bk6VJWvk
Below are my errors:
Error: [TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.google.firebase.firebase-iid-17.0.3\AndroidManifest.xml:12] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
UnityEditor.HostView:OnGUI()
Error: [TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.google.firebase.firebase-measurement-connector-impl-17.0.3\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
UnityEditor.HostView:OnGUI()
C:/Program Files/Java/jdk1.8.0_51\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Android/sdktools" -Dfile.encoding=UTF8 -jar "D:\Unity\5.6.0\Editor\Data\PlaybackEngines\AndroidPlayer/Toolssdktools.jar" -
stderr[
Error: [TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.google.firebase.firebase-iid-17.0.3\AndroidManifest.xml:12] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
@android:name="com.google.firebase.components.ComponentDiscoveryService">
-- @android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"
@android:name="com.google.firebase.components.ComponentDiscoveryService">
++ @android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"
Error: [Temp\StagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\Temp\StagingArea\android-libraries\com.google.firebase.firebase-measurement-connector-impl-17.0.3\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
-- @android:exported="false"
-- @android:name="com.google.firebase.components.ComponentDiscoveryService">
--++ @android:name="com.google.firebase.components.ComponentDiscoveryService">
++++ @android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
]
stdout[
Warning: [Temp\StagingArea\AndroidManifest-main.xml:12, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\Temp\StagingArea\android-libraries\android.arch.lifecycle.runtime-1.0.0\AndroidManifest.xml:3] Main manifest hasbut library uses targetSdkVersion='26'
[TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.android.support.support-core-ui-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.android.support.support-core-utils-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.android.support.support-fragment-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.android.support.support-media-compat-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.android.support.support-v4-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.google.firebase.firebase-analytics-impl-16.2.3\AndroidManifest.xml:12] Skipping identical /manifest/application/receiver[@name=com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver] element.
Warning: [TempStagingArea\AndroidManifest-main.xml:12, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.google.firebase.firebase-common-16.0.4\AndroidManifest.xml:2] Main manifest hasbut library uses targetSdkVersion='26'
Warning: [TempStagingArea\AndroidManifest-main.xml:12, D:\Documents\Unity Projects\Unity 5.6.0\MyFirstFirebaseProject\TempStagingArea\android-libraries\com.google.firebase.firebase-storage-16.0.5\AndroidManifest.xml:3] Main manifest hasbut library uses targetSdkVersion='26'
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()
@DarkFroggy658 as I mentioned in https://github.com/firebase/quickstart-unity/issues/192#issuecomment-415622826 update your Android SDK's tools package, it looks like you're using the old tools which do not support the latest AndroidManifest syntax.
@stewartmiles
i have same issue
`CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
D:/Android/Java/jdk1.8.0_111\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Android/sdktools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Toolssdktools.jar" -
stderr[
Error: [TempStagingArea\AndroidManifest-main.xml, E:\Baloot Games\BasketballDarShahr HamrahAval\BasketballDarShahr HamrahAval\BasketballDarShahr\TempStagingArea\android-libraries\com.google.firebase.firebase-measurement-connector-impl-17.0.3\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
-- @android:name="com.google.firebase.components.ComponentDiscoveryService">
--
++
]
stdout[
[TempStagingArea\AndroidManifest-main.xml, E:\Baloot Games\BasketballDarShahr HamrahAval\BasketballDarShahr HamrahAval\BasketballDarShahr\TempStagingArea\android-libraries\com.android.support.support-core-ui-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, E:\Baloot Games\BasketballDarShahr HamrahAval\BasketballDarShahr HamrahAval\BasketballDarShahr\TempStagingArea\android-libraries\com.android.support.support-core-utils-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, E:\Baloot Games\BasketballDarShahr HamrahAval\BasketballDarShahr HamrahAval\BasketballDarShahr\TempStagingArea\android-libraries\com.android.support.support-fragment-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, E:\Baloot Games\BasketballDarShahr HamrahAval\BasketballDarShahr HamrahAval\BasketballDarShahr\TempStagingArea\android-libraries\com.android.support.support-media-compat-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, E:\Baloot Games\BasketballDarShahr HamrahAval\BasketballDarShahr HamrahAval\BasketballDarShahr\TempStagingArea\android-libraries\com.android.support.support-v4-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, E:\Baloot Games\BasketballDarShahr HamrahAval\BasketballDarShahr HamrahAval\BasketballDarShahr\TempStagingArea\android-libraries\com.google.firebase.firebase-analytics-impl-16.2.3\AndroidManifest.xml:12] Skipping identical /manifest/application/receiver[@name=com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver] element.
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()`
i update my SDK but don't work !!! again i have this issue
i'm using unity 5.6.1
@studiokarisma I'm pretty sure it's your SDK. You need to make sure Unity is pointing at the right SDK on your system.
i have updated SDK but still having this error.
And the relevant manifest files are
i am trying to implement firebase crashkytics from previour 2 days.i have many other sdks already in my project,when i import firebase crashlytics sdk,it gives error when i try to create build in unity,here is the import screen where some files are going to change
import screen
And when i try to build it gives error
**\TempStagingArea\android-libraries\com.google.firebase.firebase-measurement-connector-impl-17.0.5\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/service[@name=com.google.firebase.components.ComponentDiscoveryService] element:
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)**
and the 2nd error is
@android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
]
stdout[
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\com.android.support.support-compat-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\com.android.support.support-core-ui-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\com.android.support.support-core-utils-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\com.android.support.support-fragment-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\com.android.support.support-media-compat-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\com.android.support.support-v4-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\com.google.firebase.firebase-analytics-impl-16.3.0\AndroidManifest.xml:12] Skipping identical /manifest/application/receiver[@name=com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\mopub\AndroidManifest.xml:12] Skipping identical /manifest/application/activity[@name=com.google.android.gms.ads.AdActivity] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\mopub\AndroidManifest.xml:22] Skipping identical /manifest/application/activity[@name=com.adcolony.sdk.AdColonyInterstitialActivity] element.
[TempStagingArea\AndroidManifest-main.xml, C:\Users\Irfan\Desktop\JA\TempStagingArea\android-libraries\mopub\AndroidManifest.xml:23] Skipping identical /manifest/application/activity[@name=com.adcolony.sdk.AdColonyAdViewActivity] element.
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
Please help me.
Thankyou
I am having the same issue. I tried updating my sdk to the latest version i.e. 26.1.1 but then the editor apk building doesn't even pass the platform detecting stages. It gives another error saying unable to detect platform tools. I am using unity 5.3 with .net 3.5 and latest firebase sdk auth and database package. It works perfectly in editor though. How to fix it? Please Help.