Build.gradle file setup

Question!

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.+' 
}
By : iappmaker


Answers

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'
By : Anton A.


This video can help you solving your question :)
By: admin