While anyone getting the following errors while building/running the Android app. Please try following solutions to resolve the issues .
Logcat Errors :
Cannot fit requested classes in a single dex file (# methods: 71636 > 65536)
Java Compiler Error :
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
Caused by: com.android.tools.r8.utils.AbortException: Error: null, Cannot fit requested classes in a single dex file (# methods: 71636 > 65536)
Solution to Resolve:
a) Add dependency in
build.gradle file:implementation 'com.android.support:multidex:1.0.3'
b) Add multiDexEnabled In
build.gradle's defaultConfig section:multiDexEnabled true

No comments:
Post a Comment