android { ... defaultConfig { ... minSdkVersion 21 multiDexEnabled true } } dependencies { ... implementation 'androidx.multidex:multidex:2.0.1' }
Programming Tips - Error: Cannot fit requested classes in a single dex file.Try supplying a main-dex list
Date: 2024may3
Q. Error: Cannot fit requested classes in a single dex file.Try supplying a main-dex list
A. For me with androidX, these changes did the trick: