Reputation: 528
I want to build a simple ARcore app with Unity. So I followed the ARCore quickstart documentation for Unity, but when I tried to build the APK, this error appeared:
"Manifest Merger Failed with multiple errors, see logs. See the Console for details."
So the logs reported the following issues
I have searched the internet and can't seem to find a definitive answer. What am I missing? Thanks in advance.
Upvotes: 2
Views: 2800
Reputation: 357
See the Known limitations section of About ARCore XR Plugin unity docs.
Due to changes made in Google's ARCore clent libraries which are redistribute in ARCore XR Plugin, projects built with Unity 2019.4 must be updated to use Gradle 5.6.4 or later. Please refer to these instructions for updating your project's Gradle version.
Then you can follow these steps Build for Android 11 with Unity. Even if you are targeting less than Android 11 you need to follow these steps.
Upvotes: 3
Reputation: 803
Your AndroidManifest.xml file is malformed. In particular, you are missing a package name.
First thing is to make sure that you have set a package name in the project player settings. Go to File -> Build Settings, hit the Player Settings button, then find the "Package name" field, and make sure it is filled out. It should be of the form com.YourOrganization.YourGameName
Next, if you have one or more AndroidManifest.xml files in your Assets folder somewhere, one of them should have this line:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.YourOrganization.YourGameName" android:versionCode="1" android:versionName="1.0">
Note the package="..."
part. The error is complaining that this is missing. Fill in the same name as you put in the player settings.
Upvotes: 2
Reputation: 75
Caution: Targeting Android 11 (API level 30) with versions of Unity 2020.1 or earlier requires special Gradle configuration. See Building for Android 11 with Unity for more details.
In case that your build target API level is set to 30 (Android 11), the link above could very likely help you.
In case that you does not help though, I would recommend adding a picture of your Build Settings to your post for additional detail.
I hope this was helpful!
Upvotes: 1