I am using the official sample source code of Google Firebase Authentication for my project. The problem seems simple, but it is not actually.
I have declared the dependency on Gradle file as shown below:
// Firebase Authentication
implementation 'com.google.firebase:firebase-auth:16.0.3'
The following imports are not configured as expected:
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.EmailAuthProvider;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
If I will hover over the import, then says Add library com.google.firebase:firebase-auth:16.0.3
to classpath.
app Gradle File:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
// compileSdkVersion 27
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.sampletest.app.app"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
implementation project(':feature')
implementation project(':base')
// implementation 'com.android.support:appcompat-v7:27.1.1'
// implementation 'com.android.support:animated-vector-drawable:27.1.1'
// implementation 'com.android.support:cardview-v7:27.1.1'
// implementation 'com.android.support:design:27.1.1'
// Firebase Core
implementation 'com.google.firebase:firebase-core:16.0.3'
// Firebase Authentication
implementation 'com.google.firebase:firebase-auth:16.0.3'
// Ads
implementation 'com.google.firebase:firebase-ads:15.0.1'
// Analytics
implementation 'com.google.firebase:firebase-analytics:16.0.3'
// App Indexing
implementation 'com.google.firebase:firebase-appindexing:16.0.1'
// Cloud Firestore
implementation 'com.google.firebase:firebase-firestore:17.1.0'
// Cloud Functions
implementation 'com.google.firebase:firebase-functions:16.1.0'
// Cloud Messaging
implementation 'com.google.firebase:firebase-messaging:17.3.2'
// Cloud Storage
implementation 'com.google.firebase:firebase-storage:16.0.2'
// Crash Reporting
implementation 'com.google.firebase:firebase-crash:16.2.0'
// Crashlytics
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
// Dynamic Links
implementation 'com.google.firebase:firebase-dynamic-links:16.1.1'
// Invites
implementation 'com.google.firebase:firebase-invites:16.0.3'
// In-App Messaging
implementation 'com.google.firebase:firebase-inappmessaging:17.0.1'
// In-App Messaging Display
implementation 'com.google.firebase:firebase-inappmessaging-display:17.0.1'
// ML Kit: Model Interpreter
implementation 'com.google.firebase:firebase-ml-model-interpreter:16.2.0'
// ML Kit: Vision
implementation 'com.google.firebase:firebase-ml-vision:17.0.0'
// ML Kit: Image Labeling
implementation 'com.google.firebase:firebase-ml-vision-image-label-model:15.0.0'
// Performance Monitoring
implementation 'com.google.firebase:firebase-perf:16.1.0'
// Realtime Database
implementation 'com.google.firebase:firebase-database:16.0.2'
// Remote Config
implementation 'com.google.firebase:firebase-config:16.0.0'
// Google Sign In SDK (only required for Google Sign In)
implementation 'com.google.android.gms:play-services-auth:16.0.0'
// Firebase UI
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
// Facebook Android SDK (only required for Facebook Login)
// Used in FacebookLoginActivity.
implementation 'com.facebook.android:facebook-login:4.35.0'
// implementation 'com.android.support:customtabs:27.1.1'
// Twitter Android SDK (only required for Twitter Login)
implementation 'com.twitter.sdk.android:twitter-core:3.3.0'
implementation 'com.twitter.sdk.android:twitter:3.3.0'
}
apply plugin: 'com.google.gms.google-services'
Thank you in advance.