My app works perfectly when you run it on API 23 - 25
, but on API 21 & 22
it crashes with the following error:
12-12 15:01:18.436 2
Actually , There is one more reason of this issue : When we using gradle build with :
compile 'com.google.android.gms:play-services:xxxx'
We had to compile the entire package of APIs into our app.In some cases, doing so made it more difficult to keep the number of methods in our app (including framework APIs, library methods, and your own code) under the 65,536 limit. So the solution: we should build with only packages which we use : Example :
compile 'com.google.android.gms:play-services-analytics:x.x.x'
compile 'com.google.android.gms:play-services-gcm:x.x.x'
More detail : https://developers.google.com/android/guides/setup