# Unity and ARDK 2.5.2 Gradle Build fail

**URL:** <https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724>\
**Category:** I'm Stuck\
**Created:** [July 21, 2023, 2:22pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724 "2023-07-21T14:22:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gavin\_Prior](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@Gavin\_Prior](https://community.nianticspatial.com/u/Gavin_Prior)\
**Post date:** [July 21, 2023, 2:22pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724/1 "2023-07-21T14:22:50Z")

</div>

- Issue category: Beginner tutorial
- Device type & OS version: Android
- Host machine & OS version: Mac Intel Ventura 13.4.1
- Issue Environment: Unity
- ARDK version: 2.5.2
- Unity version: 2020 and 2021.3.27f1

Description of the issue:  
Hi. I am brand new to Lightship and am not a happy bunny after following all instructions for the very first beginner tutorial that will not build and following many many MANY suggestions (and wasted days) on how to fix the problem all to no avail. Here’s what I have tried so far:

- Followed all instructions on ’ Getting Started With ARDK’
- Initially tried using Unity version 2020 (as recommeded on the tutorial) which didn’t work and then tried another(!) recommended version 2021.3.27f1 as a stable version that will build to Android which also didn’t work
- Got the latest version of Gradle and linking to it via settings
- Custom Base Gradle Template is set to plugin version 4.2.0
- Tried various combinations of Minimum API Level and Target API level via the tutorial and also online forums where people said they had success - none of which worked for me

Here are the errors (using Minimum API Level 7.1 and Target API level 31).  
I couldn’t add any more detail as I am new here and it wont let me (which is stupid as I can’t show you the full errors! Can you tell I am frustrated?).  
Any help would be gratefully appreciated:

* * *

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

* * *

Picked up JAVA\_TOOL\_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build failed with an exception.

- What went wrong:

A problem occurred configuring project ‘:unityLibrary’.

> Failed to notify project evaluation listener.

> ……….org/gradle/api/plugins/MavenPlugin

- 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 [//help.gradle.org](https://help.gradle.org).

* * *

CommandInvokationFailure: Gradle build failed.

……/Users/gavinprior/Documents/Unity/2021.3.27f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath “/usr/local/Cellar/gradle/8.2.1/libexec/lib/gradle-launcher-8.2.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease”

---

<div class="post-metadata">

**Author:** ![Dylan\_Smit](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/dylan_smit/32/562_2.png) [@Dylan\_Smit](https://community.nianticspatial.com/u/Dylan_Smit)\
**Post date:** [July 21, 2023, 8:28pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724/2 "2023-07-21T20:28:03Z")

</div>

I suggest using the gradle version mentioned in the docs, not the absolute latest

---

<div class="post-metadata">

**Author:** ![Bill\_McLaughlin](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/bill_mclaughlin/32/35_2.png) [@Bill\_McLaughlin](https://community.nianticspatial.com/u/Bill_McLaughlin)\
**Post date:** [July 21, 2023, 9:17pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724/3 "2023-07-21T21:17:08Z")

</div>

Hi Gavin, Lightship 2.5.2 should automatically install the version of Gradle it needs but the example is built to 7.5.1 so if the latest version isn’t working then try reverting. Please let me know if this fixes it.

-Bill

---

<div class="post-metadata">

**Author:** ![Gavin\_Prior](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@Gavin\_Prior](https://community.nianticspatial.com/u/Gavin_Prior)\
**Post date:** [September 27, 2023, 1:21pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724/4 "2023-09-27T13:21:52Z")

</div>

Hi Bill.

Still no luck.

I’ve also tried using 2020.3.2f1 and also a newer version of Unity 2022.3.7f1 and building both with 2.5.2 and all the generic/required settings via documentation. Still says Gradle build failed and I can’t see why.

Stuck.

---

<div class="post-metadata">

**Author:** ![Gavin\_Prior](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@Gavin\_Prior](https://community.nianticspatial.com/u/Gavin_Prior)\
**Post date:** [September 27, 2023, 1:49pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724/5 "2023-09-27T13:49:16Z")

</div>

Tried that and followed various suggestions in forums. No luck.

---

<div class="post-metadata">

**Author:** ![Tobias\_Reidl](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/tobias_reidl/32/1688_2.png) [@Tobias\_Reidl](https://community.nianticspatial.com/u/Tobias_Reidl)\
**Post date:** [September 27, 2023, 3:04pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724/6 "2023-09-27T15:04:40Z")

</div>

I had a Gradle error in the past too. I downloaded Gradle 6.7.1 and unpacked it into a folder.

> **[Gradle | Releases](https://gradle.org/releases/)**
>
> Find binaries and reference documentation for current and past versions of Gradle.

Next I went into Unity → Settings → and manually selected the Gradle version .

 ![Screenshot 2023-09-27 at 17.03.37](https://us1.discourse-cdn.com/niantic/original/2X/e/e99ceb88e5c827c4e282865f7e791f6368967cda.png)

Then everything worked fine

---

<div class="post-metadata">

**Author:** ![Gavin\_Prior](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@Gavin\_Prior](https://community.nianticspatial.com/u/Gavin_Prior)\
**Post date:** [October 10, 2023, 2:02pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724/7 "2023-10-10T14:02:40Z")

</div>

After attempting to get this working (between other projects) over 6 weeks or so with no luck (I had tried all that was suggested and more and still no idea why it didn’t work), I was ready to throw it all away and try another AR solution. I thought I would give it one more try by downloading ARDK 3.0 and it worked first time out!

So I will stick with the Beta and have a play with that. I’ve taken a look at the How To’s. Any suggestions on videos/tutorials for 3.0?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/system/32/13_2.png) [@system](https://community.nianticspatial.com/u/system)\
**Post date:** [October 10, 2023, 4:03pm UTC](https://community.nianticspatial.com/t/unity-and-ardk-2-5-2-gradle-build-fail/3724/8 "2023-10-10T16:03:10Z")

</div>

This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.
