I am trying to build on Unity 2019.4.0 but the failed stating that
Cannot fit requested classes in a single dex file (# methods: 68231 > 65536)
The solution for this is to enable multiDex I have done that by following the below steps
Information
external-dependency-manager Version 1.2.156
Jetifier is Enabled
Min API Level 19
Target API Level 28
Custom Gradle Template is enabled and I have added the following in it
Android Manifest Application Tag add the following in the tag
android:name="androidx.multidex.MultiDexApplication"
Enable custom gradle template from Player Settings
then in mainTemplate.gradle add in dependencies
implementation 'com.android.support:multidex:1.0.1'
and in DefaultConfig add
multiDexEnabled true
I have followed the above steps but build fails on same issue which is
Cannot fit requested classes in a single dex file (# methods: 68231 > 65536)
Need help on it, it seems custom gradle file is not working at all. Hope to find a solution here soon.