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 { }
"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