Issue category: Lightship Maps
Device type & OS version: Android
Host machine & OS version: Windows
Issue Environment: Unity
Description of the issue:
Hey Niantic Team!
I’m new to ARDK and currently exploring its features by trying to build the Emoji Garden sample from the documentation. However, I’m running into a build issue where Unity prompts me to set the Android Gradle path to version 6.7.1 or higher. Despite updating Gradle, I keep encountering warnings related to deprecated repositories (jcenter()
), flatDirs
, and aapt2FromMavenOverride
.
Additionally, my project is set to prefer project repositories, but Unity’s default Gradle configuration appears to be enforcing settings repositories instead. I’d like to ensure my Gradle setup is correctly optimized for Lightship Maps and avoid these conflicts.
Could you provide guidance on:
- The correct Gradle version and configuration required for the Emoji Garden sample?
- How to properly switch to project repositories in Unity’s Gradle settings?
- Any best practices for new developers using ARDK to avoid build issues?
Thanks in advance!
Hi Ferjen,
Emoji Garden is no longer supported and will be replaced with a new sample in a coming ARDK release. I can address your three questions since they’re more Android-centric but won’t be able to do a deep dive into any other issues pertaining to Emoji Garden itself.
- For this, I would recommend Unity 2022.3.57f1. That version will already have an up-to-date version for Gradle and won’t require any external version to be added; just make sure you go back into the external tools and use the defaults pre-packaged with Unity. If you’re using Unity 2021 that version is still packaged with a version of Gradle that is too old which requires users to change it manually.
- The only switching I’m aware of that can be done with Gradle is by going to the Unity Preferences and under External Tools, locating the Android section, and picking whether you want to use what’s pre-packaged with Unity or supply your own versions of Gradle, JDK, NDK, etc… but on Unity 2022 this should be left alone.
- I’d recommend sticking to at least 2022.3.57 since 2022 comes with updates that make developing with ARDK easier. Other than that just make sure you have your build settings set to what our documentation suggests and you should be good to go.
Thank you!, will try the sample project instead