Unity ARCore Manifest merger failed ,Unity ARCore : Manifest merger failed : Attribute meta-data#com.google.ar.core@value value=(optional) from [:google_ar_optional:] AndroidManifest.xml:7:54-78

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processReleaseManifest’.

Manifest merger failed : Attribute meta-data#com.google.ar.core@value value=(optional) from [:google_ar_optional:] AndroidManifest.xml:7:54-78
is also present at [:google_ar_required:] AndroidManifest.xml:7:54-78 value=(required).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:7:9-81 to override.,Got the following error for Unity ARCore project.
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processReleaseManifest’.

Manifest merger failed : Attribute meta-data#com.google.ar.core@value value=(optional) from [:google_ar_optional:] AndroidManifest.xml:7:54-78
is also present at [:google_ar_required:] AndroidManifest.xml:7:54-78 value=(required).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:7:9-81 to override.

Got the solution.

Create a custom Assets/Plugins/Android/AndroidManifest.xml

Add following metadata line in it:

        tools:replace="android:value"
        android:name="com.google.ar.core"
        android:value="required"