I have Android Studio 3.0.1. After added new library, when I tried launching the app it did not launch with the message:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
But I don't know how to solve this error. I googled this but with no success.
My app gradle:
apply plugin: 'com.android.application' android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.xxxxxxx.app"
minSdkVersion 15
targetSdkVersion 26
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
versionCode 3
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.1.0'
compile 'com.android.volley:volley:1.0.0'
compile files('libs/KGJsonConverter.jar')
compile files('libs/gson-2.2.4.jar')
compile 'com.github.amigold.fundapter:library:1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile files('libs/PhotoUtil.jar')
compile files('libs/GenAsync.1.2.jar')
compile files('libs/MD5Simply.jar')
compile 'com.soundcloud.android:android-crop:1.0.1#aar'
compile 'com.quickblox:quickblox-android-sdk-core:3.3.0'
compile 'com.quickblox:quickblox-android-sdk-chat:3.3.0'}
my project gradle:
buildscript {
repositories {
jcenter()
google()
} dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'}}allprojects {
repositories {
jcenter()
google() maven{ url 'https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/'}}}task clean(type: Delete) { delete rootProject.buildDir}
Use the dependencies below.
compile 'com.quickblox:quickblox-android-sdk-videochat-webrtc:3.3.3#aar'
compile 'com.quickblox:quickblox-android-sdk-content:3.3.3#aar'
compile('com.quickblox:quickblox-android-sdk-chat:3.3.3#aar') {
transitive = true
}
Related
Hello guys this is the error which I faced while I was running the app. I am fresher to android so I cant get the results.I already gone through some tech websites it suggested to change versions (compile SDK version and Build tools version ) yet I cant solve this. Can any one help me to solve this ?.
Error Message :
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Android Build.gradle file.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.24.4'
}
}
apply plugin: 'com.android.application'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'io.fabric'
android {
compileSdkVersion 25
buildToolsVersion "26.0.2"
repositories {
maven {
url 'https://maven.google.com'
}
maven { url 'https://maven.fabric.io/public' }
}
defaultConfig {
applicationId "com.smartgladiator.link"
minSdkVersion 21
targetSdkVersion 25
// Enabling multidex support.
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
versionCode 2
// versionName "1.0.37.1"
versionName "1.0.38"
}
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
zipAlignEnabled true
debuggable false
lintOptions {
disable 'MissingTranslation'
disable 'ResourceType'
}
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
useLibrary 'org.apache.http.legacy'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:customtabs:25.4.0'
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:support-v13:25.4.0'
//compile 'com.android.support:multidex:1.0.1'
//to make supported components
compile 'com.android.support:support-v4:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'org.glassfish.tyrus.tests.servlet:tyrus-tests-servlet-autobahn-server:1.12'
compile 'org.glassfish.tyrus.tests:tyrus-tests-servlet-autobahn-server:1.0-b13'
compile 'com.github.nkzawa:socket.io-client:0.3.0'
compile 'com.baoyz.actionsheet:library:1.1.7'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.makeramen:roundedimageview:2.3.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.3'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
compile project(':speech')
// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
}
Make sure android sdk localtion is set correctly
ANDROID_HOME = home/user/android_sdk/ "this is correct location"
ANDROID_HOME = home/user/android_sdk/tools "wrong path"
or
downgrade your gradle version
I trying to add picasso dependencies even any dependencies but got Error:
Error:(26, 13) Failed to resolve: com.squareup.picasso:picasso:2.5.2
Show in File Show in Project Structure dialog
whats the problem & any solution?
my build.gradle (module)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.example.dr.myapplication"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.synnapps:carouselview:0.1.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.8.2'
compile 'junit:junit:4.12'
}
my build.gradle(project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I think there is a bug in android studio when i try to use lottie library
from lottie introduction :
Gradle is the only supported build configuration, so just add the dependency to your project build.gradle file:
dependencies {
...
compile 'com.airbnb.android:lottie:2.2.5'
... }
I've added the dependency , but project is not sync and not being built.
-here is complete error :
Error:Execution failed for task ':app:prepareComAndroidSupportAnimatedVectorDrawable2610Library'.
Unable to unzip 'C:\Users\ramin\.gradle\caches\modules-2\files-2.1\com.android.support\animated-vector-drawable\26.1.0\abdf83a0192c03ff190f941c6c885af18d257a2c\animated-vector-drawable-26.1.0.aar' to 'C:\Users\ramin\.android\build-cache\6b7ed6c6f6a25dd18477727c16a13e0789c57b4e\output'
any idea ?
build.gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "chavosh.com.bztebuses"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
testCompile 'junit:junit:4.12'
compile 'com.github.devlight.navigationtabstrip:navigationtabstrip:1.0.4'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.github.boxme:squarecamera:1.1.0'
compile 'com.minimize.library:seekbar-compat:0.2.5'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.github.medyo:fancybuttons:1.8.4'
compile 'com.airbnb.android:lottie:2.2.5'
}
allprojects {
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "http://dl.bintray.com/gigamole/maven/" }
maven { url "http://dl.bintray.com/ahmedrizwan/maven" }
jcenter()
maven {
url "https://maven.google.com"
}
}
}
when I place the
apply plugin: 'com.google.gms.google-services'
in library module in app level it show an error like
'Could not get unknown property 'LibraryVariants' for object of type com.android.build.gradle.LibraryExtension'
So I removed the plugin it build successfully. But the data is not store in FireStore. How can I store the data when I place the plugin in library module.
How to solve that problem ?
Root level app module :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.example.vijayasrivudanti.pages"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.stripe:stripe-android:4.1.5'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.android.gms:play-services:11.4.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.firebase:firebase-firestore:11.4.2'
compile 'com.google.android.gms:play-services-auth:11.4.2'
testCompile 'junit:junit:4.12'
compile project(':pays')
}
apply plugin: 'com.google.gms.google-services'
Library app module :
// enter code here
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.stripe:stripe-android:4.1.5'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.android.gms:play-services:11.4.2'
compile 'com.android.support:multidex:1.0.1'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-firestore:11.4.2'
//compile project(':ReactAndroid')
//compile (project(':react-native-firestack')){exclude group: 'com.google.android.gms' }
}
apply plugin: 'com.google.gms.google-services'
Add the below in your root build.gradle file
classpath 'com.google.gms:google-services:3.1.0'
In a library module, you do not need to add the plugin; you can directly use the compile repo of Google services. Just make sure it is there in app level build.gradle file.
Below is a sample whole file:
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.google.firebase:firebase-plugins:1.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
jcenter()
mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
here is a sample app level build.gradle file
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-crash'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.ncommunity.agriculture"
minSdkVersion 15
targetSdkVersion 26
versionCode 11
versionName "1.10"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
signingConfig signingConfigs.config
resValue("string", "PORT_NUMBER", "8081")
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
debugCompile project(':debug-db')
compile project(':tracker')
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.android.gms:play-services-places:11.4.2'
compile 'com.google.android.gms:play-services-maps:11.4.2'
compile 'com.github.dmytrodanylyk.shadow-layout:library:1.0.3'
/* compile 'com.google.android.gms:play-services:11.4.0'*/
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.google.firebase:firebase-crash:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.github.Kunzisoft:Android-SwitchDateTimePicker:1.7'
compile 'com.github.safetysystemtechnology:location-tracker-background:v1.2'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:recyclerview-v7:26.1.0'
testCompile 'junit:junit:4.12'
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
My app.gradle
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.mss.plix"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
//====================Add below two line=============
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries = false //delete the already predexed libraries
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
ext {
permissionsDispatcherVersion = '2.1.2'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.jakewharton:butterknife:7.0.1'
testCompile 'junit:junit:4.12'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.isseiaoki:simplecropview:1.1.4'
compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
compile 'com.github.aakira:expandable-layout:1.4.1#aar'
compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
apt "com.github.hotchemi:permissionsdispatcher-processor:2.1.3"
compile project(':library')
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.android.support:cardview-v7:24.2.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.android.support:support-v4:24.2.1'
}
repositories {
jcenter()
}
My Project Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0-rc2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
My Log output when trying to get token
E/UncaughtException: java.lang.IncompatibleClassChangeError: android.support.v4.content.ContextCompat
at com.google.android.gms.iid.zzd.zzeC(Unknown Source)
at com.google.android.gms.iid.zzd.<init>(Unknown Source)
at com.google.android.gms.iid.zzd.<init>(Unknown Source)
at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
at com.mss.plix.Notifications.GCMRegistrationIntentService.registerGCM(GCMRegistrationIntentService.java:43)
at com.mss.plix.Notifications.GCMRegistrationIntentService.onHandleIntent(GCMRegistrationIntentService.java:30)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
I am implementing Push notification in my app, but when I am calling GcmIntentService, I'm getting the error that I have already posted in my log output. I also tried using FCM but getting the same issue. If anyone has implemented this, then please help. Thanks in advance.
**> Got Answer of my question the error is because of using play service
9.0.0
But when we update the play service to 9.4.0 and same as firebase
dependency .and the main issue in my gradle is apply plugin:
'com.google.gms.google-services' will not come at the top of gradle it
will come at the bottom after dependency .And i dont know why this
works fine and my token and context compact issue also got resolved.**
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.mss.plix"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
//====================Add below two line=============
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries = false //delete the already predexed libraries
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
ext {
permissionsDispatcherVersion = '2.1.2'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.jakewharton:butterknife:7.0.1'
testCompile 'junit:junit:4.12'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.isseiaoki:simplecropview:1.1.4'
compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
compile 'com.github.aakira:expandable-layout:1.4.1#aar'
compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
apt "com.github.hotchemi:permissionsdispatcher-processor:2.1.3"
compile project(':library')
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.android.support:cardview-v7:24.2.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.android.support:support-v4:24.2.1'
}
apply plugin: 'com.google.gms.google-services'
repositories {
jcenter()
}
it should be like this . :)