Error message when building

Include the following details (edit as applicable):

  • Issue category: Semantic Segmentation / Multiplayer / Real-time Mapping-Depth / ARDK Documentation / Unity Example Package / Sample App aka ‘AR Voyage’ / ARDK Virtual Studio Tools / Developer Tools / Networking / VPS
  • Device type & OS version: Android / iOS / Other Ex. iPhone 8+ on iOS 13
  • Host machine & OS version: Mac / Windows / Linux / Other Ex. Mac on Big Sur x.x
  • Issue Environment : Unity Remote / Unity Mock / On Device / Dev Portal
  • Xcode version:
  • ARDK version:
  • Unity version:

Description of the issue:

when i try to build in unity i get the following error messages. i have tried to fix them multiple way’s with no luck. any suggestions?

1 Like

Fill in the details about ARDK and unity version please

Hiya Kyle,

In order to help you I need to collect some information:

  1. What version of ARDK are you using?
  2. What version of Unity are you using?
  3. What device are you building to, Android or iOS?
  4. What are your specifications for the computer that you’re using?
  5. Can you send me a screenshot of your build settings as well?

Once I have this information I will be able to help you troubleshoot your build.

is that everything you needed?

Update to the latest 2020 Unity version and try again

update to 2021.3.6f1 and that error has been fixed, got a few gradle errors due to a issue with that version that i fixed. but now i get this error. all of the resources online are saying to go to assets>play services>android resolver but i don’t have that setting. any suggestions?

CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “bundleDebug”

stderr[

FAILURE: Build failed with an exception.

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

1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class a.a.a found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class a.a.b found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.a.a.a found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.a.a.b found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.a.a.c found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.a.b.a.a.a.a found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.a.b.a.a.a.b found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.a.b.a.a.a.c found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.a.b.a.a.a.d found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.a.b.a.a.a.e found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Anchor found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Anchor$CloudAnchorState found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ArCoreApk found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ArCoreApk$Availability found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ArCoreApk$InstallBehavior found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ArCoreApk$InstallStatus found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ArCoreApk$UserMessageType found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ArCoreApkJniAdapter found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ArImage found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.AugmentedFace found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.AugmentedFace$RegionType found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.AugmentedImage found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.AugmentedImage$TrackingMethod found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.AugmentedImageDatabase found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Camera found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.CameraConfig found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.CameraConfig$DepthSensorUsage found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.CameraConfig$FacingDirection found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.CameraConfig$TargetFps found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.CameraConfigFilter found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.CameraIntrinsics found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Config found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Config$AugmentedFaceMode found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Config$CloudAnchorMode found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Config$FocusMode found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Config$LightEstimationMode found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Config$PlaneFindingMode found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Config$UpdateMode found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Coordinates2d found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Frame found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.HitResult found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ImageFormat found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ImageMetadata found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.InstallActivity found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.LightEstimate found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.LightEstimate$State found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Plane found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Plane$Type found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Point found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Point$OrientationMode found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.PointCloud found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Pose found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Quaternion found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Session found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Session$Feature found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.SessionCreateJniHelper found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.SharedCamera found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.Trackable found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.TrackableBase found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.TrackingFailureReason found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.TrackingState found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.a found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.aa found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ab found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ac found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ad found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ae found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.af found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ag found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ah found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ai found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.aj found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ak found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.al found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.am found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.an found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.annotations.NativeEnum found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.annotations.UsedByNative found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.annotations.UsedByReflection found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.ao found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.b found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.c found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.d found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.e found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.AnchorNotSupportedForHostingException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.CameraNotAvailableException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.CloudAnchorsNotConfiguredException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.DataInvalidFormatException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.DataUnsupportedVersionException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.DeadlineExceededException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.FatalException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.ImageInsufficientQualityException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.MissingGlContextException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.NotTrackingException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.NotYetAvailableException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.ResourceExhaustedException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.SessionNotPausedException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.SessionPausedException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.TextureNotSetException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.UnavailableApkTooOldException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.UnavailableArcoreNotInstalledException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.UnavailableDeviceNotCompatibleException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.UnavailableException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.UnavailableSdkTooOldException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions.UnavailableUserDeclinedInstallationException found in modules arcore-runtime.jar (:arcore:) and arcore_client-runtime.jar (:arcore_client:)
Duplicate class com.google.ar.core.exceptions

and i removed the other version of unity and now i get this error instead of the last one.

…\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\src\main\AndroidManifest.xml:38:13-38 Error:
Attribute meta-data#com.google.ar.core.min_apk_version@value value=(210910000) from [:arcore_client:] AndroidManifest.xml:38:13-38
is also present at [:nar-dependencies:] AndroidManifest.xml:45:13-38 value=(191106000).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:36:9-38:41 to override.
…\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\src\main\AndroidManifest.xml:88:13-37 Error:
Attribute meta-data#com.google.ar.core@value value=(required) from [:unityLibrary] AndroidManifest.xml:88:13-37
is also present at [:nar-dependencies:] AndroidManifest.xml:53:13-37 value=(optional).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:86:9-88:40 to override.

FAILURE: Build failed with an exception.

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

Manifest merger failed with multiple errors, see logs

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 9s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

2021.3.6f1 has a build issue for andoid. Use 2021.3.5, 2020 lts or fix it: https://forum.unity.com/threads/unity-2021-3-6f-android-gradle-template-folder-missing-build-failed.1306626/

did that. changed it to 2021.3.5f1 now i get this error. any suggestions?
image

As it says, what does it say in the console

it says this:
…\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\src\main\AndroidManifest.xml:38:13-38 Error:
Attribute meta-data#com.google.ar.core.min_apk_version@value value=(210910000) from [:arcore_client:] AndroidManifest.xml:38:13-38
is also present at [:nar-dependencies:] AndroidManifest.xml:45:13-38 value=(191106000).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:36:9-38:41 to override.
…\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\src\main\AndroidManifest.xml:90:13-37 Error:
Attribute meta-data#com.google.ar.core@value value=(required) from [:unityLibrary] AndroidManifest.xml:90:13-37
is also present at [:nar-dependencies:] AndroidManifest.xml:53:13-37 value=(optional).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:88:9-90:40 to override.

FAILURE: Build failed with an exception.

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

Manifest merger failed with multiple errors, see logs

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 26s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
strong text

  1. What did you set the minimum android API to?
  2. Do you use a custom androidmanifest file?

is there anything else you need?

Hello Kyle,

Have you made sure to remove the Vulkan Graphics API from your project? Here is how to do that:

  1. Go to project settings
  2. Select “Player”
  3. Under “Other Settings” uncheck Auto Graphics API.
  4. You want to remove Vulkan as it does not work with ARDK presently.
  5. Click on Vulkan and click the minus symbol to remove it.

Please let us know how this works for you.

i have done that to fix another issue. still getting the colliding attributes error.

Hi @kyle_smith ,
Quick question for you, this to me looks like an installation issue between Unity and the NDK, not really related to the ARDK itself…
Can you try building any other sample for Android and see if you get the same errors?
If so, I think the easiest solution is re-installing everything related to the NDK and Unity (maybe even the JDK) and verifying that the environment variables involved are also pointing to the right places.
Or you could try the suggestion in the error too

now if i build using the same setting but in a different project. so android mobile 3d game instead of android ar mobile game i have no issue.

so its something that is in the ar game. either the adrk, arcore or xr.

Well yes, the error reads about arcore in androidmanifest

So any suggestion? Because I try to do what it recommends and then it gives me a message saying you don’t need to do that anymore because it’s depreciated you need to add this to a line of code that I can’t see because it’s referring to line like 34 or 33 and I only see four lines

Can your share the content of the androidmanifest file?