teiser2016 / Game

0 stars 0 forks source link

error: the number of method references in a .dex file cannot exceed 24K #21

Closed diamantoula closed 7 years ago

diamantoula commented 7 years ago

paw na to treksw kai mou vgazei to parapanw error. prospathisa kai to multidex enable kai dn douleuei

diamantoula commented 7 years ago

SOLVED !!!

vrika giati den etrexe to programma (i etrexe polu arga se kapoious)

EKSIGISI:

Unable to build apk: The number of method references cannot exceed 64K occur when app .dex file have more than 65,536 methods.

Exceed 65K Method that means method count more than 65,536 methods There are different ways to fix it:

  1. Reduce dependencies in your project put dependencies in gradle which are required

Most problems that I found from another developers is use Google Play Services in them project like this.

compile 'com.google.android.gms:play‐services:8.4.0' So the best way is choosing only some dependencies in Google Play Services that you really want to use it.

compile 'com.google.android.gms:play‐services‐location:8.4.0' compile 'com.google.android.gms:play‐services‐maps:8.4.0' compile 'com.google.android.gms:play‐services‐ads:8.4.0'