Thursday, 4 October 2018

Error: Cannot fit requested classes in a single dex file (# methods: 87573 > 65536) When you try to generate apk in Android Studio 3.2

After updating my Android Studio from 3.0.1 to 3.2 and today when I tried to generate apk to run my project in my android phone, I stuck on error:-

"Error: Cannot fit requested classes in a single dex file (# methods: 87573 > 65536)"

After searching on internet I found this working solution for me.

Let see the screen shot -



To resolve this -

Go to app level build.gradle and add this dependency under dependencies { }

implementation 'com.android.support:multidex:1.0.3'

also add this line in defaultConfig { } section

multiDexEnabled true 




and then click sync now.



Now your problem is resolved.

No comments:

Post a Comment

Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...