I receive this error and program crashes when I try to run the app on phone with older than API level 22. However the app works fine on phone with API level 22. What could b
I followed the 2nd approach mentioned by jackaal. I had included the whole play services in my gradle. After removing this and selecting only the required play services apis fixed my problem.
Since the play services has a lot of apis, the total method count is beyond 65k by itself. So this causes error in mobiles with api level 21 and below.
Before gradle:-
compile 'com.google.android.gms:play-services:8.4.0'
After gradle:-
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.android.gms:play-services-plus:8.4.0'