ConorIsAMelon
ConorIsAMelon

Reputation: 59

"Manifest merger failed with multiple errors, see logs" error, Arcore using Unity

I'm a total beginner using unity and recently I've been looking into arcore. More specifically, I've been trying to get this example "HelloAR" up and running on unity version 2019.4.18f1 (https://developers.google.com/ar/develop/unity/quickstart-android)

I've followed the steps completely however I keep getting the same error, "Manifest merger failed with multiple errors, see logs". After looking into the errors it seems that the problem was related to the gradle. Here are the errors: Errors

I've tried downloading gradle 6.6.1 and making it the custom gradle in unity,

I've checked the boxes shown in this manual : (https://developers.google.com/ar/develop/unity/android-11-build),

I've added the following code to both launchertemplate and maintemplate:

I've tried using other solutions but have not been able to fix it.

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        // Must be Android Gradle Plugin 3.6.0 or later. For a list of
        // compatible Gradle versions refer to:
        // https://developer.android.com/studio/releases/gradle-plugin
        classpath 'com.android.tools.build:gradle:6.6.1'
    }
}

However, I've had no luck getting rid of these errors. Any help would be greatly appreciated!

Upvotes: 1

Views: 440

Answers (1)

Çağatay IŞIK
Çağatay IŞIK

Reputation: 957

For Unity 2019.3 and above

Enable Custom Base Gradle Template

Enable Custom Base Gradle Template

Then go to it's location Assets -> Plugins -> Android -> baseProjectTemplate.gradle

Change your gradle to classpath 'com.android.tools.build:gradle:3.4.3'

Stay with Unity's recommended gradle

enter image description here

For Unity 2018

Enable custom main template

enter image description here

Go your mainTemplate.gradle and change your gradle version to classpath 'com.android.tools.build:gradle:3.4.3'

Stay with Unity's recommended gradle version aswell.

Upvotes: 1

Related Questions