Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Official ARCore XR Plugin 2.12 Requires Updated Gradle On Unity 2019.4

Discussion in 'AR' started by mdurand, Nov 11, 2020.

Thread Status:
Not open for further replies.
  1. mdurand


    Unity Technologies

    Aug 1, 2016
    Hi All-

    Due to changes made in Google's ARCore client libraries which are redistributed 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:

    The build error you will see when attempting to build using the default version of Gradle is:

    Missing 'package' key attribute on element package at [:arcore_client:] AndroidManifest.xml:30:9-54

    We're sorry for the inconvenience. Unity 2020.1 and later ships with a newer version of Gradle that does not require this workaround.

  2. chenklein


    Aug 11, 2012
    I have too many unresolved issues trying to build to Android.

    The main purpose of the app is recognizing images from a physical workbook, and showing 2D animations "on" the page, using AR Foundation to recognize the page and Camera's Ray cast hit to spot the correct image on the page.

    The iOS version of the app works smoothly (using AR Kit), but when trying to export the same project to an Android device (using AR Core) I find a lot of bugs -
    1.A long delay before recognition
    2.Recognizing one image as the other
    3.Removing all detected images in track state limited, insteaad of only the last lost image.

    Completlty different resaults from the iOS version.

    The project is built on Unity 2019.4 LTC and AR Foundation 4.0.1 preview 2.
  3. Fangh


    Apr 19, 2013

    This is breaking any Unity Cloud Build when using 2019.x
    Is there a way to configure gradle for Unity Cloud Build ?
    widogame likes this.
  4. widogame


    Jul 20, 2020
    Hello mdurand,

    Are you planning to ship newer Gradle on Unity 2019.4.x ?
    pixelR, jgmakes and unnanego like this.
  5. jgmakes


    Jan 10, 2019
    @mdurand, adding Gradle 5.6.4 to the 2019.4 LTS branch would be great. There are still some outstanding 2020 bugs (like this one) that are keeping us from moving to 2020.
    anattress likes this.
  6. jgmakes


    Jan 10, 2019
    Hey @mdurand,

    That page assumes the target Android version is 11. I'm actually building to 10 (and would like to keep supporting those devices) so is that strange that I'm getting the same error?

    My first attempt at this fix didn't solve it for me using the 2019.4 instructions.

    === EDIT (with a little more info as the fix required a few more tweaks for me) ===
    I tried upgrading to ARFoundation 4.1.3 because last night I noticed in the 4.1.3 changelogs a mention of Gradle 5.6.4 support but strangely it's absent today–actually there are only notes for 4.1.1 suddenly).

    With ARFoundation / ARKit / ARCore 4.1.3 and the Gradle Main and Launcher Template patches I had additional steps to take to get it working, presumably because I use Google's External Dependency Manager (for Firebase) and it was throwing an error about needing Custom Gradle Properties, which it had never had before:

    1. Creating a Custom Gradle Properties Template with the addition
    Code (Boo):
    1. android.useAndroidX=true
    2. android.enableJetifier=true
    2. Setting checkReleaseBuilds to false (a temporary fix) in the Gradle Launcher Template
    Code (CSharp):
    1. lintOptions {
    2.      ...
    3.      checkReleaseBuilds false
    4. }
    Last edited: Jan 25, 2021
    tjPark likes this.
  7. tjPark


    Mar 19, 2015
    Thank you so much. You saved my hours fighting against Unity
Thread Status:
Not open for further replies.