Hi there,
I’m in the process of getting android builds working again for my work. We recently upgraded one of our projects from 2018.2 to 2019.1, but now we’re having issues getting local and cloud builds to work due to gradle errors. I’ve taken a number of steps after doing extensively googling and haven’t managed to make much progress on the issue.
Edit: The errors in particular I’ve been seeing are; duplicate classes mentioned in an old support file and in a androidx file, and not being able to jetify some old support files for some odd reason which is why I would have put the files into the dependencies.xml.
Updated Android Studio to the latest version.
Updated the gradle files classpath to 3.4.0.
The play resolver has been run several times, and updated.
Wrote the following two lines into the properties file so I could use AndroidX and have the old support files go through the jetifier.
android.enableJetifier=true```
I've also added the support files into the dependencies.xml and tried keeping them in, removing them, and moving them, but there's still errors. The following block is the gradle file. Please ignore that I set this to Csharp.
```csharp
/* THE UNITY COMMENT IS GONE AT THE BEGINNING */
buildscript {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
}
allprojects {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com"
}
flatDir {
dirs 'libs'
}
}
}
apply plugin: 'com.android.application'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
**DEPS**}
android {
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
multiDexEnabled true
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress '.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**
}**SIGN**
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
useProguard **PROGUARD_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
useProguard **PROGUARD_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
}
}**PACKAGING_OPTIONS****SPLITS**
**BUILT_APK_LOCATION**
}**SPLITS_VERSION_CODE****SOURCE_BUILD_SETUP**
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
Any advice or suggestions on this issue would be appreciated! Thank You!