well my app working fine getting data from Firebase. but sometimes specially after waiting long time if I open my app again it wont read data from firebase and also it gives this warning at Logcat. until I sing in and sing out it is not working.
W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms
are there any missing lines on my gradle?
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.restroomgames.whereismydudy.where"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.android.gms:play-services-maps:11.6.2'
implementation 'com.google.firebase:firebase-auth:11.6.2'
implementation 'com.google.firebase:firebase-database:11.6.2'
implementation 'com.google.firebase:firebase-messaging:11.6.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-location:11.6.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.lapism:searchview:5.0.0-alpha7'
implementation 'agency.tango.android:material-intro-screen:0.0.5'
implementation 'com.firebase:geofire-android:2.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
}
apply plugin: 'com.google.gms.google-services'
The code seems ok..
It just happened to me something similar, same warning, problems with email/password auth..
It was because I forgot to update the SHA-1 fingerprints in the project after I upgraded my computer OS..
Maybe is a problem with your API keys or SHA-1 fingerprints in your project?
No there is nothing missing in your Gradle, this problem actually has come about since the upgrade to Firebase 11.6.0 Downgrading to 11.4.2 seems to remove the warning messages.
Related
This question already has answers here:
Dependancy error when integrating android studio project with Firebase for a google sign in feature
(4 answers)
Closed 3 years ago.
I force to add firebase authentication to my app, but I take this error :
Failed firebase auth 15.0.0
It says in the solutions on the internet: If you delete part 15.0.0 will be corrected
but when :15.0.0 part is deleted,it say the authentication feature is not added.
What can I do?
My build is here:
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.ppd.ment"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-analytics:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
}
Try this one:
implementation 'com.google.firebase:firebase-auth:16.0.5'
I can build the application when it's not signed but every time I try to sign Android Studio says something along the lines of
"ERROR: Failed to resolve: com.android.support.cardview-v7:27.1.1"
I've checked this and verified it exists but it doesn't seem to work, it gives other dependency issues if I try to fix it.
"My build.gradle (app)"
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "uk.org.cetma.llanellistandard"
minSdkVersion 23
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'
}
}
}
repositories {
mavenCentral() // jcenter() works as well because it pulls from Maven
Central
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:support-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.squareup.picasso:picasso:2.71828'
testImplementation 'junit:junit:4.12'
//androidTestImplementation 'com.android.support.test:runner:1.0.2'
//androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
//Add Library
implementation 'com.android.support.cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-27.1.0'
implementation 'com.google.code.gson:gson:2.8.2'
}
I want it to sign the application so I can make sure it still works.
Below is an example of the error I get:
ERROR: Failed to resolve: com.android.support.cardview-v7:27.1.1:
Affected Modules: app
double dots are missing from your card view dependency use this -
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
try with
implementation 'com.android.support:cardview-v7:27.1.1'
I'm getting an error regarding mixing of dependency versions . Few days back it was working absolutely fine but from nowhere the issue popped up .
It's showing : All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-alpha1, 28.0.0. Examples include com.android.support:customtabs:28.0.0-alpha1 and com.android.support:animated-vector-drawable:28.0.0
I'm using Firebase dependencies also , is it causing any trouble ?
I tried to add some extra dependencies (as popped up) , but nothing is working .
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "namantiwari.epplieschool"
minSdkVersion 21
targetSdkVersion 28
versionCode 7
versionName "1.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:customtabs:28.0.0-alpha1'
implementation 'com.android.support:support-vector-drawable:28.0.0-alpha1'
implementation 'com.android.support:support-media-compat:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-messaging:17.3.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
}
apply plugin: 'com.google.gms.google-services'
Android X is supposed to solve these issues.
How to migrate to Android X
com.google.android.material:material:1.0.0-alpha3 requires a minimum sdk version of 28 and com.android.support.AppCompatActivity uses 27. So there is an error when I try and run the program.
Also, in the official material design docs, it is stated that com.android.material and com.android.support should not be used together.
So, when I remove com.android.support.AppCompatActivity, the compiler fails to resolve AppCompatActivity. What should I do?
UPDATE
I was able to resolve the exception by removing com.google.android. There was an error because com.google.android cannot be used with com.android.support.
But I get this error now:
Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl714979868.tmp/base.apk (at Binary XML file line #7): Requires development platform P but this is a release platform.]
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-P'
defaultConfig {
minSdkVersion 21
targetSdkVersion 'P'
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api 'com.android.support:design:28.0.0-alpha1'
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
//implementation 'com.google.android.material:material:1.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You need to use alpha version of AppCompat library also.
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.google.android.material:material:1.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
I'm trying to include Firebase Authentication in my Android app, but when I compile my program I get the error
Program type already present: com.google.android.gms.auth.api.signin.internal.zzp
Changing the version from 11.8.0 to 11.2.2 worked, but I need to use Firestore, which only has 11.8.0, and the two are incompatible. Here's my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.my.app"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.google.firebase:firebase-auth:11.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.firebaseui:firebase-ui-auth:3.1.0'
implementation 'com.google.firebase:firebase-firestore:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
Is there a conflicting file I need to delete?
You need to change this:
implementation 'com.firebaseui:firebase-ui-auth:3.1.0'
to this:
implementation 'com.firebaseui:firebase-ui-auth:3.2.1'
Also there is no firebase 11.2.2, I think you meant 11.4.2 which is compatible with the above firebase ui version.
The firebase version 11.8.0 is compatible with firebaseui 3.2.1
You can check this table here: https://github.com/firebase/FirebaseUI-Android#compatibility-with-firebase--google-play-services-libraries