- **ARDK version3.0.0:
- **Unity version2022.3.2f:
Description of the issue:
I’m trying to add the lines into the baseProjectTempalte.gradle as stated in the documentation but it seems in unity 2022 the baseProjectTemplate is different than 2021 and earlier?
Im supposed to add this:
dependencies {
// If you are changing the Android Gradle Plugin version, make sure it is compatible with the
Gradle version preinstalled with Unity
// See which Gradle version is preinstalled with Unity here
Unity - Manual: Gradle for Android
// See official Gradle and Android Gradle Plugin compatibility table here
Android Gradle plugin release notes | Android Studio | Android Developers
// To specify a custom Gradle version in Unity, go do “Preferences > External Tools”, uncheck
“Gradle Installed with Unity (recommended)” and specify a path to a custom Gradle version
classpath ‘com.android.tools.build:gradle:4.2.0’
BUILD_SCRIPT_DEPS
}
Specifically the classpath ‘com.android.tools.build:gradle:4.2.0’ into the dependency section but that does not seem to exist in unity 2022’s template. I’ve tried adding it in and various places, as well as just copying the one from a working 2021 ARDK 3.0.0 project but I still get gradle build errors.
The baseProjectTemplate.gradle as supplied when adding it to a unity 2022 project is as follows:
plugins {
// If you are changing the Android Gradle Plugin version, make sure it is compatible with the
Gradle version preinstalled with Unity
// See which Gradle version is preinstalled with Unity here
Unity - Manual: Gradle for Android
// See official Gradle and Android Gradle Plugin compatibility table here
Android Gradle plugin release notes | Android Studio | Android Developers
// To specify a custom Gradle version in Unity, go do “Preferences > External Tools”, uncheck
“Gradle Installed with Unity (recommended)” and specify a path to a custom Gradle version
id ‘com.android.application’ version ‘7.1.2’ apply false
id ‘com.android.library’ version ‘7.1.2’ apply false
BUILD_SCRIPT_DEPS
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Does anybody know where I need to add the required line for this template?