Google Services Version conflict - android

I am trying to fix this google services version error. I have been using Google services version 10.2.4 before for Google Sign in. Now since I want to integrate the Geofencing API into my application, as per what I have researched, it requires at least a minimal version of 11.0.0. But, I am not able to figure out what exactly the issue is. Please find below the error I get
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the
google-services plugin (information about the latest version is available at
https://bintray.com/android/android-tools/com.google.gms.google-
services/) or updating the version of com.google.android.gms to 10.2.4.
Please find below my app build.gradle file
build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.project.group.projectga"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resValue "string", "google_maps_key",
(project.findProperty("GOOGLE_MAPS_API_KEY") ?: "")
}
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.mikepenz:materialdrawer:5.1.6#aar') {
transitive = true
}
//Added this for Visual Gallery implementation - Start
//Added this for Visual Gallery implementation - End
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.firebase:firebase-auth:10.2.4'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.satsuware.lib:usefulviews:2.3.6'
compile 'com.google.firebase:firebase-database:10.2.4'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.google.android.gms:play-services-auth:11.0.0'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.google.android.gms:play-services-location:11.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.mikepenz:google-material-typeface:2.2.0.1#aar'
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1#aar'
compile 'com.github.medyo:fancybuttons:1.6'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.github.yesidlazaro:GmailBackground:1.2.0'
compile 'com.android.support:support-annotations:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
}
apply plugin: 'com.google.gms.google-services'
And also my build.gradle(Project) file.
build.gradle(Project)
// 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.3.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I followed a lot of Stack Overflow answers, and they said to add the plugin of the google services at the end. I have the plugin added right from the start and it seems not to work for this. I am trying to integrate the Geofencing API which requires the Google services version to be at least 11.0.0, but I couldn't do that.

Move your firebase and com.google.android.gms modules to the same version and at least 11.0.0 :
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.google.firebase:firebase-database:11.0.2'
compile 'com.google.firebase:firebase-storage:11.0.2'
compile 'com.google.android.gms:play-services-auth:11.0.2'
compile 'com.google.android.gms:play-services-maps:11.0.2'
compile 'com.google.android.gms:play-services-location:11.0.2'

Related

Firebase API initialization failure.java.lang.reflect.InvocationTargetException

I have integrated the FCM Database in my Android project. I used it for chat application. Now I need to implement the cloud message(Push notification) using FireBase. After I implement the FCM, I got an error-
Firebase API initialization failure. java.lang.reflect.InvocationTargetException
I am sending the gradle script please have a look.
Module :app
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.swatin.groupchatapplication"
minSdkVersion 16
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'
}
}
}
repositories {
mavenCentral()
maven { url 'https://maven.google.com' }
}
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 project(':libbambuser-0.9.12')
compile 'com.basgeekball:awesome-validation:1.3'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.razorpay:checkout:1.4.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.squareup.okhttp3:okhttp:3.7.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.bumptech.glide:glide:4.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.volley:volley:1.1.0-rc1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.paypal.sdk:paypal-android-sdk:2.14.2'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
}
apply plugin: 'com.google.gms.google-services'
build.gradle (Project: ProjectName)
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
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
To solve this, you need to add the following line of code:
apply plugin: 'com.google.gms.google-services'
As the last line in your build.gradle (Project: ProjectName) file.
And if you are using also authentication, please also this line of code:
compile 'com.google.android.gms:play-services-auth:10.0.1'
I also strongly recommend you to use the latest versions for your Firebase dependencies. The latest version is now: 11.8.0.
The last version for Google Play Services is:
classpath 'com.google.gms:google-services:3.2.0'

Failed to resolve: com.google.firebaseui:firebase-ui:3.0.0

It failed to resolve: com.google.firebaseui:firebase-ui:3.0.0.I've included all the necessary dependencies.Also,I've enabled the Google Button Login in the firebase.Still,the problem exists.I'm unable to resolve the firebaseui error.
build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.application.moneyapp"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
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.1'
compile 'com.android.support:animated-vector-drawable:26.0.1'
compile 'com.android.support:mediarouter-v7:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services:11.4.2'
compile 'com.google.android.gms:play-services-auth:11.4.2'
compile 'com.google.android.gms:play-services-vision:11.4.2'
compile 'com.google.firebaseui:firebase-ui:3.0.0'
compile 'com.google.firebase:firebase-auth:11.4.2'
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.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
build.gradle(Project:Sample)
// 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.3.3'
classpath 'com.google.gms:google-services:3.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects
{
repositories {
jcenter()
maven{
url "https://maven.google.com"
}
}
}
I am getting this following Error..I know that this Question is already in Stack Overflow but it does not resolve my problem.
Messages Gradle Sync is showing this error
In the old sample answers,solution is to install Google Repository and Google play Service in SDK Manager..Even after installing them to the latest version,I am getting the Same Error..Please resolve my problem..
Thanks in Advance :)
There is no all-inclusive FirebaseUI package, so you need to specify the individual library that you require.
From the FirebaseUI installation documentation:
FirebaseUI is published as a collection of libraries separated by the Firebase API they target. Each FirebaseUI library has a transitive dependency on the appropriate Firebase SDK so there is no need to include those separately in your app.
In your app/build.gradle file add a dependency on one of the FirebaseUI libraries.
dependencies {
// FirebaseUI for Firebase Realtime Database
compile 'com.firebaseui:firebase-ui-database:3.1.0'
// FirebaseUI for Cloud Firestore
compile 'com.firebaseui:firebase-ui-firestore:3.1.0'
// FirebaseUI for Firebase Auth
compile 'com.firebaseui:firebase-ui-auth:3.1.0'
// FirebaseUI for Cloud Storage
compile 'com.firebaseui:firebase-ui-storage:3.1.0'
}

fix the version conflict either by updating the version of the google-services or updating the version of com.google.android.gms

I'm just trying to use the Firebase Cloud Messaging but i'm getting a error. This is my first time doing this, so i think could be a version of the location services of something. I already put a few libraries, but i'm not sure whats is the problem.
The Firebase is which is making some problems.
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.2.6.
This is my Gradle (App).
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.xxx.xxx.xxx"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}
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'
})
allprojects {
repositories {
// Add this line
maven { url "https://jitpack.io" }
}
}
compile('com.wdullaer:materialdatetimepicker:3.2.2') {
exclude group: 'com.android.support'
}
compile 'com.google.firebase:firebase-core:10.2.6'
compile 'com.github.Mariovc:ImagePicker:1.2.0'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.+'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.android.support:support-v4:26.0.0-alpha1'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.android.support:cardview-v7:26.0.+'
compile 'com.android.support:recyclerview-v7:26.0.+'
compile 'de.hdodenhof:circleimageview:2.1.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
And this is the other Gradle.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.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
}
Please help me, i'm in a rush
You are using different version of the same library using:
compile 'com.google.firebase:firebase-core:10.2.6'
compile 'com.google.android.gms:play-services-location:11.0.4'
You can use:
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.android.gms:play-services-location:11.0.4'
or you can switch to the latest stable version:
compile 'com.google.firebase:firebase-core:11.2.0'
compile 'com.google.android.gms:play-services-location:11.2.0'
This release requires to add the google maven repo.
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
More info about the releases of google play services here and firebase here.
Also you should use the stable version of:
compile 'com.android.support:support-v4:26.0.0'
Try to change the firebase version to the following:
compile 'com.google.android.gms:play-services:11.0.2'
compile 'com.google.firebase:firebase-core:11.0.2'
And add play-services
This error also occurs if one does not add apply plugin: 'com.google.gms.google-services' to the bottom of app/build.gradle. I happened to overlook it and added it below apply plugin: 'com.android.application'.

Error after upgrade Google Play Services to 11.0.0 version

I have a strange issue. After uploading Google Play Services library from version 10.2.6 to version 11.0.0, when i try to compile I get this error:
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.0.0.
I visited the link mentioned in the error and the last version of the google-services plugin seems to be 3.1.0, ie the version i am using, and i have already upgraded all the play services libraries to 11.0.0 version. What can I do to compile my code with 11.0.0 version of GMS?
Here's my build.gradle file (module scope):
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.app"
minSdkVersion 15
targetSdkVersion 25
versionCode 23
versionName "0.7.3.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id : "12345678-1234-1234-1234-123456789",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
prontopro {
applicationId "com.example.app"
buildConfigField "boolean", "TEST_ENVIRONMENT", "false"
}
prontoproTest {
applicationId "com.example.app"
buildConfigField "boolean", "TEST_ENVIRONMENT", "true"
}
}
dataBinding {
enabled = true
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services-places:11.0.0'
compile 'com.google.android.gms:play-services-location:11.0.0'
compile 'org.parceler:parceler-api:1.1.6'
annotationProcessor 'org.parceler:parceler:1.1.6'
annotationProcessor 'com.android.databinding:compiler:2.2.2'
compile 'com.viewpagerindicator:library:2.4.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.2'
compile 'com.google.code.gson:gson:2.7'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.chrisbanes:PhotoView:1.2.6'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'io.realm:android-adapters:2.0.0'
compile 'com.google.firebase:firebase-crash:10.2.6'
//reactive libraries
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.2.3'
compile 'com.jakewharton.rxbinding:rxbinding:1.0.0'
compile 'com.jakewharton.rxbinding:rxbinding-support-v4:1.0.0'
compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:1.0.0'
compile 'com.jakewharton.rxbinding:rxbinding-design:1.0.0'
compile 'com.jakewharton.rxbinding:rxbinding-recyclerview-v7:1.0.0'
compile 'com.tbruyelle.rxpermissions:rxpermissions:0.8.2#aar'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.github.pwittchen:reactivenetwork:0.8.0'
compile 'com.hwangjr.rxbus:rxbus:1.0.5'
compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2'
//testing
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.6.3'
//onesignal
compile 'com.onesignal:OneSignal:3.4.4#aar'
compile "com.mixpanel.android:mixpanel-android:5.1.0"
compile 'com.google.android.gms:play-services-gcm:11.0.0'
}
apply plugin: 'com.google.gms.google-services'
And finally here's my build.gradle file (app scope):
// 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.3.2'
classpath 'io.realm:realm-gradle-plugin:3.1.4'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
maven { url "https://jitpack.io" }
mavenCentral()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
You should delete the line apply plugin: 'com.google.gms.google-services'
Because apply plugin: 'com.android.application' already has same package.
That's where the conflict arises.
UPDATE:
Use Play services version 11.0.1
Use play Service Version 12.0.0 and
in project level gradle use classpath 'com.google.gms:google-services:3.1.0'
EDIT Answer updated to latest version
You probably all ready fixed the issue, but updating Firebase plugin also to 11.0.1 fixed the problem for me.
What worked for me was the following
Project Gradle
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.google.gms:google-services:3.0.0'
App Gradle
compileSdkVersion 26
buildToolsVersion '26.0.0'
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
multiDexEnabled = true
}
dependencies
// compile 'com.crittercism:crittercism-android-agent:+'
compile project(':paymentGatewayCommons')
compile project(':paypal')
compile project(':paytm')
compile project(':payu')
compile 'com.fasterxml.jackson.core:jackson-core:2.9.0.pr1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.0.pr1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:11.0.1'
compile 'com.google.android.gms:play-services-base:11.0.1'
//compile 'com.google.android.gms:play-services-appindexing:11.0.1'
//compile 'com.google.android.gms:play-services-contextmanager:11.0.1'
compile 'com.google.android.gms:play-services-places:11.0.1'
compile 'com.google.android.gms:play-services-nearby:11.0.1'
compile 'com.google.android.gms:play-services-maps:11.0.1'
compile 'com.google.android.gms:play-services-ads:11.0.1'
compile 'com.google.android.gms:play-services-auth:11.0.1'
compile 'com.google.android.gms:play-services-gcm:11.0.1'
compile 'com.google.android.gms:play-services-analytics:11.0.1'
compile 'com.google.android.gms:play-services-location:11.0.1'
compile 'com.google.maps.android:android-maps-utils:0.4.+'
compile 'com.google.zxing:core:3.2.0'
compile 'com.journeyapps:zxing-android-embedded:3.3.0#aar'
compile 'com.google.firebase:firebase-messaging:11.0.1'
compile 'com.google.firebase:firebase-core:11.0.1'
compile 'com.google.firebase:firebase-analytics:11.0.1'
compile 'com.flurry.android:analytics:6.4.2'
compile 'com.android.support.constraint:constraint-layout:+'
testCompile 'junit:junit:4.12'
After a major update of Android Studio, clean an rebuild your project.Better You can use version 10.
Try targeting directly the required servies like if you want to get SmsRetriver compile
compile 'com.google.android.gms:play-services-auth-api-phone:11.0.1'
Rather Than
compile 'com.google.android.gms:play-services:11.0.1'

google play service and firebase App on older device issue

I've an Firebase App with following dependencies
// Play Services
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.google.android.gms:play-services-base:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services-location:9.0.2'
// Firebase
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.google.firebase:firebase-storage:9.0.2'
compile 'com.google.firebase:firebase-common:9.0.2'
compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.google.firebase:firebase-database:9.0.2'
compile 'com.google.firebase:firebase-crash:9.0.2'
compile 'com.google.firebase:firebase-core:9.0.2'
compile 'com.google.firebase:firebase-messaging:9.0.2'
When I run the app on OS 4.4.2, I get an error as app is not working, I found that this is the issue with com.google.android.gms play-services when I installed the com.google.android.gms 9.4.xx I got error This app requires newer Virson of OS
Question: Is there any settings/dependencies should I use so that my Firebase should work on older devices as well please help in this case!
#Crazy Coder
Just want to confirm if your device with API Level 17 had Google Play Services installed? If not, it is necessary to have a Google Play Services installed on your device in order for this to work.
Please also note that your Google Play Services should be version 9.4.0 or newer.
I hope this helps. Just let me know if you still have any other concern
http://i.stack.imgur.com/2s5h5.png
this is my app level gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.app.ids"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
useLibrary 'org.apache.http.legacy'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.0.+'
compile 'com.android.support:recyclerview-v7:23.0.+'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile fileTree(include: '*.jar', dir: 'libs')
compile files('libs/ksoap2-android-assembly-2.4-jar-with-dependencies.jar')
compile 'com.android.support:multidex:1.0.0'
compile 'com.github.oliveiradev:image-zoom:0.1.0'
compile 'it.sephiroth.android.library.imagezoom:imagezoom:+'
compile 'com.android.support:design:23.4.0'
compile 'com.google.firebase:firebase-core:9.2.1'
compile 'com.google.firebase:firebase-messaging:9.2.1'
compile 'com.firebase:firebase-client-android:2.5.1+'
}
apply plugin: 'com.google.gms.google-services'
this is my project level gradle file:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:1.5.0-beta2'
classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
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()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Categories

Resources