Firebase used to work just fine yesterday, but I opened my project this morning just to find that the FirebaseAuth
class now has no reference whatsoever to the FirebaseUser
class. I cannot find the getCurrentUser()
method.
The Google doc still shows that it exists in the class, though!
My imports
in that class:
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.GetTokenResult;
import com.google.firebase.auth.GoogleAuthProvider;
The build.gradle
:
api 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.firebase:firebase-admin:6.3.0'
And yes:
- I have
apply plugin: 'com.google.gms.google-services'
in mybuild.gradle
- My app's
build.gradle
hasrepositories { google() jcenter() }
in it - I have
Clean
my project without getting errors - I have restarted
AndroidStudio
Current errors in my app (seem to have appeared out of nowhere since yesterday):
- The
getCurrentUser()
method doesn't exist anymore in myFirebaseAuth
class (which is imported). Same for itssignInWithCredential(...)
,signOut()
,createUserWithEmailAndPassword(...)
andsignInWithEmailAndPassword(...)
methods. - The
isEmailVerified()
method doesn't exist anymore in myFirebaseUser
class anymore - When trying to
Make Project
, I get this error:Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration. - auto-value-1.4.jar (com.google.auto.value:auto-value:1.4) Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future. See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
. build.gradle
'simplementation 'com.android.support:appcompat-v7:27.1.1'
is now highlighted as an error (All com.android.support librairies must have the same version specification
)
My full build.gradle
:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.payne.simpletestapp"
minSdkVersion 16
targetSdkVersion 27
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
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.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.1'
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'
api 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.firebase:firebase-admin:6.3.0'
implementation 'org.osmdroid:osmdroid-android:6.0.1'
implementation 'org.osmdroid:osmdroid-wms:6.0.1'
implementation 'org.osmdroid:osmdroid-mapsforge:6.0.1'
implementation 'org.osmdroid:osmdroid-geopackage:6.0.1'
api 'com.github.MKergall:osmbonuspack:6.5.1'
implementation 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
api 'org.apache.httpcomponents:httpclient-android:4.3.5'
implementation 'com.squareup.picasso:picasso:2.71828'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.6'
}
repositories {
maven {
url 'https://repo.spring.io/libs-milestone'
}
}
apply plugin: 'com.google.gms.google-services'
Please help? I've spent days building this class and now it doesn't work.