ardk-samples build to ardroid has been tested on many unity versions but does not work.
But you can successfully build the case you made step by step.
Issue category: Bulid Android
Framework
Device type & OS version: Android
Host machine & OS version: Windows10
Issue Environment : Unity Remote / Unity Mock / On Device / Dev Portal
ARDK version:3.0.0
Unity version:2022.3.6f1c1
Description of the issue:
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Configure project :
Build was configured to prefer settings repositories over project repositories but repository âGoogleâ was added by build file âbuild.gradleâ
Build was configured to prefer settings repositories over project repositories but repository âBintrayJCenterâ was added by build file âbuild.gradleâ
Build was configured to prefer settings repositories over project repositories but repository âflatDirâ was added by build file âbuild.gradleâ
WARNING:: Using flatDirs should be avoided because it doesnât support any meta-data formats.
Currently detected usages:
repository flatDir used in: root project âGradleâ, project â:launcherâ, project â:unityLibraryâ, âŚ
WARNING:: Please remove usages of jcenter() Maven repository from your build scripts and migrate your build to other Maven repositories.
This repository is deprecated and it will be shut down in the future.
See JCenter service update | Android Studio | Android Developers for more information.
Currently detected usages in: root project âGradleâ, project â:launcherâ, project â:unityLibraryâ, âŚ
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task â:launcher:compileReleaseJavaWithJavacâ.
Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager.
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.
Yes, I have tried all new Unity versions of Windows 10. Never succeeded.
It is worth mentioning that as long as I delete the PersistentAR and SharedAR folders under Samples, the new version of unity can be built successfully.
For this reason, I just bought a mac mini M2 system to test the 2021.3.29f1 silicon version, but the build still failed, prompting that gradle6.7.1 was required, and then replaced it with the latest version of gradle8.5 in 2021.3.29f1. No improvement. Iâm trying the 2022.3.10f1 you mentioned to see what the final result is.
Thank you for your reply! I would like to use ardk to implement an AR project. Perhaps due to limitations of vps, consider using SharedAR ImageTrackingColocalization under Samples to achieve initial positioning.
Yes, I have tried all new Unity versions of Windows 10. Never succeeded.
It is worth mentioning that as long as I delete the PersistentAR and SharedAR folders under Samples, the new version of unity can be built successfully.
For this reason, I just bought a mac mini M2 system to test the 2021.3.29f1 silicon version, but the build still failed, prompting that gradle6.7.1 was required, and then replaced it with the latest version of gradle8.5 in 2021.3.29f1. No improvement. Iâm trying the 2022.3.10f1 you mentioned to see what the final result is.
Thank you for your reply! I would like to use ardk to implement an AR project. Perhaps due to limitations of vps, consider using SharedAR ImageTrackingColocalization under Samples to achieve initial positioning.
I just tested 2022.3.10f1 under the macOS sonoma 14.2 system. When I opened ardk sample main, unity showed that The project you are opening contains compilation errors. You need to enter safe mode.
Things looked bad.
I just tested 2022.3.15f1 under the macOS sonoma 14.2 system and successfully opened ardk sample main, but the build result failed was the same as in the windows system.
In Windows system I tested 2022.3.6f1c1, 2022.3.12f1c1 and 2022.3.14f1c1.
The worst thing about the current mac and window systems is that 2022.3.10f1 will enter safe mode.
The second is 2021.3.29f1, which just prompts the gradle version problem.
Sorry for the delay, for some reason I wasnât notified about your reply. After looking at the reply from elfmimi I would recommend giving option 1 a try. This was an old issue from the earlier days of ARDK but it still crops up from time to time. I would advise against option 2 because not all Gradle version work with ARDK but if 7.1.2 worked for elfmimi then I would say you can give that one a try if you prefer to go with option 2.
Please reply with any new information if that doesnât help. Iâll keep an eye out on your post to make sure I get back to you sooner.
Also tried open 2 Option 2 ) Update Android Gradle Plugin.
Note: I couldnât find 7.1.2. I tried 6.7.1 / 7.2.2 / 7.6.2 but kept getting this message
I kept trying to publish anyway and got this message:
Configure project :
Build was configured to prefer settings repositories over project repositories but repository âGoogleâ was added by build file âbuild.gradleâ
Build was configured to prefer settings repositories over project repositories but repository âBintrayJCenterâ was added by build file âbuild.gradleâ
Build was configured to prefer settings repositories over project repositories but repository âflatDirâ was added by build file âbuild.gradleâ
WARNING:: Using flatDirs should be avoided because it doesnât support any meta-data formats.
Currently detected usages:
repository flatDir used in: root project âGradleâ, project â:launcherâ, project â:unityLibraryâ, âŚ
WARNING:: Please remove usages of jcenter() Maven repository from your build scripts and migrate your build to other Maven repositories.
This repository is deprecated and it will be shut down in the future.
See JCenter service update | Android Studio | Android Developers for more information.
Currently detected usages in: root project âGradleâ, project â:launcherâ, project â:unityLibraryâ, âŚ
Iâll be addressing you all in one message to not spam you all too many times.
@fuhua_sun Iâm not sure if youâve tried @elfmimi latest suggestion that they titled Option 3. Just one thing to note is that Option 3 isnât really an option, itâs one of the steps in Option 2 and is mandatory. Iâm noticing that our documentation for the ARDK 3 setup doesnât cover that so Iâll make sure to let our team know that it needs to be added in.
@Gary2 If youâre using Unity 2022+, you donât need to use a custom gradle version. That only applies to 2021 because the version of Gradle that 2021 comes with isnât new enough to work with ARDK, but 2022 does not have that issue. Please submit a separate topic for us to look into your issue as this topic is about a month and a half old now. Itâll be easier for us to track a newer topic
Lastly, @fuhua_sun image tracking should still be fairly reliable. Can you please submit a new topic so that we can look into this since this new issue isnât related to the gradle build issues? Please include, images, and/ or videos if possible so that we can see whatâs happening in the AR Session
I was using Unity 2022.3.17 and having Gradle problems, however I just installed 2022.3.15f and itâs working great! However I ended up having to still download and use the latest Gradle