Cannot Fit Requested Classes In a Single Dex File Error (Method) solution in Android Studio. | Java

Опубликовано: 27 Август 2022
на канале: Economic Coder
45
3

Source Code and Doubts -   / economic__coder  


In this video we are going to discuss about how to solve Cannot Fit Requested Classes In a Single Dex File (method:) error in android studio.

Cannot fit requested classes in a single dex file is one of the common errors occurred in android studio.

We can easily solve this error using 2 simple steps.

Step 1:

Go to build.gradle (Module) in android studio project. First thing you need to to do remove cannot fit requested classes in a single dex file is,

dependencies {


def multidex_version = "2.0.1"
implementation "androidx.multidex:multidex:$multidex_version"

}

Add these two lines in the dependencies part of the build.gradle(Module file).

Step 2:

In the defaultconfig{}, you need to add another line like this,

defaultConfig{
multiDexEnabled true
}

and click sync now on the top right corner of the android studio.
After adding the above two steps, the error named "Cannot fit requested classes in a single dex file" will be gone.
Thank You.




#Cannot_fit_requested_classes_in_a_single_dex_file


На этой странице сайта вы можете посмотреть видео онлайн Cannot Fit Requested Classes In a Single Dex File Error (Method) solution in Android Studio. | Java длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Economic Coder 27 Август 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 45 раз и оно понравилось 3 зрителям. Приятного просмотра!