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

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'
}

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'

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'.

Google Services Version conflict

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'

Unable to see firebase phone authentication despite enabeling it from firebase console and adding the dependencies/

I have enabled phone verification in the Authentication Methods tab in firebase console. After Linking the app to console I see only Email Verification showing up on the Firebase assistant Tab in Android Studio. Am I missing a step? I have followed googles documentation for the same.
Below are my Gradle files.
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.3.2'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.sumeet.kalwardirectorytry1"
minSdkVersion 21
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.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.intuit.ssp:ssp-android:1.0.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.google.firebase:firebase-storage:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
The phone authentication is support at the 11.0.2 lib version change the lib version at your gradle also you need to update all the Firebase used libs to same version:
compile 'com.google.firebase:firebase-auth:11.0.2'

Google Play Service with Onesignal error

So I added Firebase in my project and then tried to add Onesignal in my project. But I getting this error.
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.1.
My App Level Gradle File :-
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.kanishq.onesignal"
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "xxxxxxxxx"]
}
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:24.2.1'
compile 'com.android.support:design:24.2.1'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-database:10.2.1'
compile 'com.google.firebase:firebase-core:10.2.1'
compile 'com.onesignal:OneSignal:3.+#aar'
// Required for OneSignal, even if you have added FCM.
compile 'com.google.android.gms:play-services-gcm:+'
// Required for geotagging
compile "com.google.android.gms:play-services-location:+"
}
apply plugin: 'com.google.gms.google-services' }
Project Level Build.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.3'
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
}
I followed Onesignal Documentation- here and Firebase Docs
Help me!! To get Onesignal and Firebase both, and remove this error.
Thanks
A dependency report for the dependencies you posted shows that OneSignal:3.+ is resolving to OneSignal:3.4.3, which has transitive dependencies on version 10.0.1 of the Firebase and Play Services libraries. Update your dependencies as shown below:
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.onesignal:OneSignal:3.4.3#aar'
// Required for OneSignal, even if you have added FCM.
compile 'com.google.android.gms:play-services-gcm:10.0.1'
// Required for geotagging
compile 'com.google.android.gms:play-services-location:10.0.1'
Although OneSignal docs use '+' to get the latest version, it's considered safer to specify the exact version of dependencies to get better visibility and control of the versions used.
In android studio go to .. Tool > Android > Sync Project with gradle should fix this issue.if not manually add the version for
com.onesignal:OneSignal:3.+#aar
com.google.android.gms:play-services-gcm:+
compile "com.google.android.gms:play-services-location:+"
finally syc the gradle

Categories

Resources