Unity and ARDK 2.5.2 Gradle Build fail

  • 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.


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”

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

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

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.

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

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

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

Then everything worked fine

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?

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