I resolved this issue and if anyone is experiencing this issue try these options(3rd point fixed my problem):
-
Add
multiDexEnabled true
in defaultConfig of build.gradle.defaultConfig {
applicationId "com.something.ranjith.androidprojdel"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
} -
Remove android support library if your activity extends `AppcompatActivity’
compile 'com.android.support:support-v4:22.+'
//remove this -
If you have
PlayServices
in your app then remove thePlayServices
and add the individual APIs.
For eg:- if you are usingPlayServices
for ads then just addcompile com.google.android.gms:play-services-ads:7.5.0
instead ofcompile com.google.android.gms:play-services:7.5.0
List of individual APIs of PlayServices:
- Google+
com.google.android.gms:play-services-plus:7.5.0
- Google Account Login
com.google.android.gms:play-services-identity:7.5.0
- Google Actions, Base Client Library
com.google.android.gms:play-services-base:7.5.0
- Google App Indexing
com.google.android.gms:play-services-appindexing:7.5.0
- Google App Invites
com.google.android.gms:play-services-appinvite:7.5.0
- Google Analytics
com.google.android.gms:play-services-analytics:7.5.0
- Google Cast
com.google.android.gms:play-services-cast:7.5.0
- Google Cloud Messaging
com.google.android.gms:play-services-gcm:7.5.0
- Google Drive
com.google.android.gms:play-services-drive:7.5.0
- Google Fit
com.google.android.gms:play-services-fitness:7.5.0
- Google Location, Activity Recognition, and Places
com.google.android.gms:play-services-location:7.5.0
- Google Maps
com.google.android.gms:play-services-maps:7.5.0
- Mobile Ads
com.google.android.gms:play-services-ads:7.5.0
- Google Nearby
com.google.android.gms:play-services-nearby:7.5.0
- Google Panorama Viewer `com.google.android.gms:play-services-panorama:7.5.0
- Google Play Game services
com.google.android.gms:play-services-games:7.5.0
- SafetyNet
com.google.android.gms:play-services-safetynet:7.5.0
- Google Wallet
com.google.android.gms:play-services-wallet:7.5.0
- Android Wear
com.google.android.gms:play-services-wearable:7.5.0