error in import statement Cannot resolve symbol FirebaseAuth - android

In the import statement of Firebase is being highlighted red
After doing clean and rebuild project the error is had not been resolved. Dependencies are added in build.gradle but still nothing is happening
please help.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.admin.myapp"
minSdkVersion 16
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(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:palette-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.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'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.firebaseui:firebase-ui:2.0.1'
implementation 'com.firebaseui:firebase-ui-auth:2.0.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.firebaseui:firebase-ui:2.0.1'
}
apply plugin: 'com.google.gms.google-services'
This is my build.gradle file.

Add this to your build.gradle
implementation com.google.firebase:firebase-auth:16.0.2

Related

Migration of app from target sdk 28 to 30 giving library error

I am migrating my application from target sdk 28 to 30 because to upload it on playstore its required but its giving library error for all the libraries.
Below is app level build file with all the required libraries.
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.devakya.kinderstudyzone"
manifestPlaceholders = [onesignal_app_id: "38d403ad-a92d-487f-afa2-c9b1a8c2907d",
onesignal_google_project_number: "REMOTE"]
minSdkVersion 17
targetSdkVersion 30
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true // <------
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildTypes.each {
it.buildConfigField 'String', 'server_url', server_url
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.0'
androidTestImplementation 'androidx.test:runner:1.4.1-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0-alpha03'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//implementation 'com.android.support:customtabs:30.0.0'
implementation 'androidx.browser:browser:1.4.0'
//implementation 'com.android.support:support-v4:30.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
//implementation 'com.android.support:exifinterface:30.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.3'
// implementation 'com.android.support:support-media-compat:30.0.0'
implementation "androidx.media:media:1.4.3"
// implementation 'com.android.support:recyclerview-v7:30.0.0'
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
//implementation 'com.android.support:cardview-v7:30.0.0'
implementation "androidx.cardview:cardview:1.0.0"
// implementation 'com.android.support:design:30.0.0'//appcompact
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.android.gms:play-services-ads:17.2.1'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.onesignal:OneSignal:3.10.8#aar'
implementation 'me.relex:circleindicator:1.2.2#aar'
implementation 'com.github.siyamed:android-shape-imageview:0.9.3#aar'
implementation 'com.google.android.ads.consent:consent-library:1.0.7'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.mobsandgeeks:android-saripaar:2.0.2'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation project(':bettervideoplayer')
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.google.firebase:firebase-analytics:16.5.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.mjn1369:prettydialog:1.0.4'
implementation project(path: ':SmoothCheckBox-master')
implementation 'com.github.bosphere.android-fadingedgelayout:fadingedgelayout:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
}
apply plugin: 'com.google.gms.google-services'
How I resolve this error for libraries .which library version I change for it.
I am getting version crashes issue for aome libraires but I am unable to resolve it.

Cannot fit requested classes in a single dex file. Try supplying a main-dex list. # methods: 87928 > 65536

what is main this and how to fix the error
Cannot fit requested classes in a single dex file. Try supplying a
main-dex list.
methods: 87928 > 65536
here is my gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.apoce.app.admin"
minSdkVersion 16
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.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-database:16.0.2'
implementation 'com.google.firebase:firebase-core:16.0.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.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.facebook.android:facebook-login:[4,5)'
implementation 'com.firebaseui:firebase-ui:4.1.0'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.facebook.android:facebook-android-sdk:4.36.1'
}
apply plugin: 'com.google.gms.google-services'
i fix this error by adding this dependencie to gardle app
implementation "androidx.multidex:multidex:2.0.1"
and this configuration multiDexEnabled true to defaultConfig

firebase phoneauth- returned Gms: com.google.firebase.auth.api.internal.zzal#830b094

As I said in the title it used to work fine but suddenly it doesn't anymore, I'm not getting any errors in 'Run' so I really can't locate where the probleme is
here is my gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.nearmessenger"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
allprojects {
repositories {
jcenter()
maven { url "https://dl.bintray.com/hani-momanii/maven" }
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-emoji-appcompat:28.0.0'
implementation 'com.android.support:support-emoji-bundled:28.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.google.android.material:material:1.1.0-alpha03'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
implementation 'com.google.firebase:firebase-database:16.0.6'
implementation 'com.firebaseui:firebase-ui-database:4.3.1'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-storage:15.0.2'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
as well as I'm getting this feedback when i click on the send code button in 'RUN':
W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal#830b094

Gradle warning about "compile" even though none found

I am making an Android app and I keep on getting the following warning. This warning is preventing me from connecting to Firebase on another PC when I clone the repo.
Warning:Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
I have replaced all "compile" with implementation but still getting the warning. Below is the build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "ak1195apps.employeelogs"
minSdkVersion 17
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(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'joda-time:joda-time:2.10'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:recyclerview-v7: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'
implementation 'com.android.support:cardview-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'
Upgrading to gradle 3.2.0 solved the problem.

Failed in gradle synchronizing

As my gradle file on app level is as:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.developer.pkcaller"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-iid:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
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 files('libs/volley.jar')
implementation 'com.firebaseui:firebase-ui:2.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.hbb20:ccp:1.7.2'
implementation 'com.facebook.android:facebook-login:[4,5)'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.google.android.gms:play-services-analytics:16.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
//implementation 'com.google.android.gms:play-services:16.0.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.google.android.gms:play-services:12.0.1'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
And I got error is as follows:
error: cannot access zzbgl class file for
com.google.android.gms.internal.zzbgl not found
Please help me solve this. I am stuck in this. Please help me regarding I will be highly grateful to you.

Categories

Resources