3

Everything worked before I updated Android Studio, Android Support Repository, Google Play Services, and Google Repository today. Now I can't get past my login screen. As I mentioned in the title, I'm using Firebase for authentication and data storage.

I'm also using an emulator: Nexus 6p API 23

Here's the error that I get when I try to sign in

03-05 13:39:50.689 2790-2852/alodia.medremind W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
03-05 13:39:50.698 2790-2852/alodia.medremind W/GooglePlayServicesUtil: Google Play services out of date.  Requires 10298000 but found 10084470

Here's my project build.gradle:

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'
    classpath 'com.google.gms:google-services:3.0.0'
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}

allprojects {
repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Here's my app build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "alodia.medremind"
        minSdkVersion 15
        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(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.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.github.paolorotolo:appintro:4.1.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.firebase:firebase-core:10.2.0'
compile "com.google.firebase:firebase-auth:10.2.0"
compile "com.google.firebase:firebase-database:10.2.0"
compile "com.google.firebase:firebase-storage:10.2.0"

compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'org.parceler:parceler-api:1.1.1'

compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
testCompile 'junit:junit:4.12'
apt 'org.parceler:parceler:1.1.1'
}
apply plugin: 'com.google.gms.google-services'

It'd be great to be able to fix this issue, but I mostly want to know the why behind this problem. I'm fairly new to Android and I'm sure that I misunderstand a lot of basic concepts.

AL.
  • 36,815
  • 10
  • 142
  • 281
Treecorn
  • 91
  • 1
  • 6

6 Answers6

2

clean your project and rebuild, if not worked then you can refer to this post.

Community
  • 1
  • 1
xbadal
  • 1,284
  • 2
  • 11
  • 24
0

Your google play service must be in version 10.2.0 or higher :

'com.google.gms:google-services:10.2.0'
Aznhar
  • 610
  • 1
  • 10
  • 30
  • Two questions then. First, how do you gather that from the errors above? Second, where do I place that? When I place it in the app build.gradle I get the following error: Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApkCopy'. > Could not find com.google.gms:google-services:9.0.0. Required by: MedRemind:app:unspecified – Treecorn Mar 05 '17 at 23:03
  • Place it on your app build gradle and remove it from the project gradle. the "Google Play services out of date." error indicates you that your play services version is too old – Aznhar Mar 05 '17 at 23:07
  • Removing it from the project build.gradle leads to this error: Error:(49, 0) Plugin with id 'com.google.gms.google-services' not found. – Treecorn Mar 05 '17 at 23:25
  • Changing just the app build gradle to contain compile 'com.google.gms:google-services:10.2.0' leads to this error: Error:Could not find com.google.gms:google-services:10.2.0. Required by: MedRemind:app:unspecified Search in build.gradle files – Treecorn Mar 05 '17 at 23:27
  • Do you have the 'google-services.json' file in your app folder ? – Aznhar Mar 05 '17 at 23:31
  • take a look here : https://developers.google.com/android/guides/google-services-plugin mabe it could help – Aznhar Mar 05 '17 at 23:31
0

Your emulator system image does not have the latest revision (10.2.98) of Google Play Services.

From Android Studio, open the SDK Manager and check the Show Package Details box. Because you are testing with an API 23 image, scroll down to the section for Android 6.0. Update the emulator images with names of the form Google APIs ... System Image. The latest is Rev 20.

When you run the emulator, you can confirm you have the latest version by going to Settings > Apps, scrolling to Google Play Services, and clicking to see the version number in the App Info.

Bob Snyder
  • 37,759
  • 6
  • 111
  • 158
0

I solved this problem by updating Google Play Services in the phone from 8.0 to 11.0.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
0

i just solved my problem bro, i think you just need re-sync the firebase, follow this step click tab Tools -> firebase -> choose 1 of the firebase feature -> if the button connected is in the gray color, you have to re-sync the firebase, it will update the firebase configuration to the latest version. hope it will help.

0

make sure that you have added firebase authentication to your project after you connected the project to firebase.