Search Unity

Android build error with ArCore

Discussion in 'ARCore' started by pleasehelpmewithunity, Mar 28, 2019.

  1. pleasehelpmewithunity

    pleasehelpmewithunity

    Joined:
    Mar 28, 2019
    Posts:
    1
    I've been trying to build my project to a gradle build but I'm continuing to get this error.

    upload_2019-3-28_17-34-35.png
    I came across this forum with a similar issue (https://forum.unity.com/threads/problem-when-building-for-android.545594/) . The answer proposed (deleting core-1.1.4.arr) allows the project to build however the ARCore functionality isn't present. I've reinstalled ARCore/ARFoundation from the package manage with no luck as well.

    Here's there error:

    CommandInvokationFailure: Gradle build failed.
    /Applications/Unity/Hub/Editor/2018.3.10f1/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/Hub/Editor/2018.3.10f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    stderr[
    /Users/Jules/Desktop/Dragons Den/Dragon's Den/Temp/gradleOut/src/main/AndroidManifest.xml:43:13-38 Error:
    Attribute meta-data#com.google.ar.core.min_apk_version@value value=(181012000) from [:arcore_client:] AndroidManifest.xml:43:13-38
    is also present at [:core-1.4.0:] AndroidManifest.xml:43:13-38 value=(180626000).
    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:41:9-43:41 to override.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':processReleaseManifest'.
    > Manifest merger failed : Attribute meta-data#com.google.ar.core.min_apk_version@value value=(181012000) from [:arcore_client:] AndroidManifest.xml:43:13-38
    is also present at [:core-1.4.0:] AndroidManifest.xml:43:13-38 value=(180626000).
    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:41:9-43:41 to override.

    * 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 1s
    ]
    stdout[
    :checkReleaseClasspath
    :preBuild UP-TO-DATE
    :preReleaseBuild
    :compileReleaseAidl NO-SOURCE
    :compileReleaseRenderscript UP-TO-DATE
    :checkReleaseManifest UP-TO-DATE
    :generateReleaseBuildConfig UP-TO-DATE
    :prepareLintJar UP-TO-DATE
    :mainApkListPersistenceRelease UP-TO-DATE
    :generateReleaseResValues UP-TO-DATE
    :generateReleaseResources UP-TO-DATE
    :mergeReleaseResources
    :createReleaseCompatibleScreenManifests UP-TO-DATE
    :processReleaseManifest

    See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

    :processReleaseManifest FAILED
    11 actionable tasks: 4 executed, 7 up-to-date
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <df7ba4d130594d168eec372b930522d4>:0)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    Any help would be appreciated, thanks!
     

    Attached Files:

  2. ABD_ALRAHMAN_SAMMANI

    ABD_ALRAHMAN_SAMMANI

    Joined:
    Nov 10, 2015
    Posts:
    1
    i am facing the same problem also
    if you find the solution can you post it please