0

I am hitting the following issue. I am new to editing the guild.gradle or the proguard files.

Unable to execute dex: method ID not in [0, 0xffff]: 65536

Following are list of features I need from google play services. I have the google play version version 7571000.

  1. Admob Ads
  2. Analytics
  3. IAP

Could you please let me know the setup I need to have in build.gradle and proguard files ? Also Please throw some light on build.gradle and proguard files

I have added this in my build.gradle. I still have the same issue:

Unable to execute dex: method ID not in [0, 0xffff]: 65536

Here are my libs dependencies:

dependencies {
  compile 'com.google.android.gms:play-services-ads:7.5.+' 
  compile 'com.google.android.gms:play-services-analytics:7.5.+' 
  compile 'com.google.android.gms:play-services-appindexing:7.5.+' 
  compile 'com.google.android.gms:play-services-appinvite:7.5.+' 
  compile 'com.google.android.gms:play-services-auth:7.5.+' 
  compile 'com.google.android.gms:play-services-common:7.5.+' 
  compile 'com.google.android.gms:play-services-games:7.5.+' 
  compile 'com.google.android.gms:play-services-plus:7.5.+' 
}
Blo
  • 11,903
  • 5
  • 45
  • 99
iappmaker
  • 2,945
  • 9
  • 35
  • 76

1 Answers1

0

It is seems like you have over 65K methods to do in your app. In this case you need to use MultiDex.

You can read about using MulltiDex in your app here Building Apps with Over 65K Methods

Also you can separate your GPS, like this

compile 'com.google.android.gms:play-services-base:7.5.0'
compile 'com.google.android.gms:play-services-ads:7.5.0'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
Anton A.
  • 1,718
  • 15
  • 37
  • I need to support the lower version of Android OS as well. Just stripping the unwanted methods from google play services will do – iappmaker Jun 24 '15 at 16:12
  • @iappmaker MulltiDex has no min level api, so you can use it on all versions of android – Anton A. Jun 24 '15 at 16:15
  • Check "Limitations of the multidex support library" in https://developer.android.com/tools/building/multidex.html#avoid – iappmaker Jun 24 '15 at 16:20
  • @iappmaker I see avoid, but no limitations. In case when you cant avoid 65k methods, you have to use MultiDex. Also... You can choose only parts of GPS, that you need in your app. Watch my answear update – Anton A. Jun 24 '15 at 16:31
  • @iappmakera Then you can do nothing but use `MulltiDex`. It is normal practice in big apps. – Anton A. Jun 24 '15 at 16:46