2017-03-05 24 views
3

今天我更新了Android Studio,Android支持信息庫,Google Play服務和Google Repository之前,所有工作都正常。現在我無法通過我的登錄屏幕。正如我在標題中提到的,我正在使用Firebase進行身份驗證和數據存儲。更新的Android Studio - Firebase身份驗證失敗

我還使用模擬器:6P的Nexus 23 API

下面是我得到的錯誤,當我嘗試在

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 

這裏簽署是我的項目的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 
} 

這裏是我的應用程序的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' 

能夠解決這個問題真是太好了,但我主要想知道爲什麼落後於這個問題。我對Android相當陌生,我確信我誤解了很多基本概念。

+0

清理和重建您的項目可能會幫助您 – xbadal

+0

不幸的是,我已經做了很多次。 –

回答

0

你的谷歌播放服務必須在10.2.0或更高版本:

'com.google.gms:google-services:10.2.0' 
+0

然後有兩個問題。 首先,你是如何從上述錯誤中收集的? 其次,我在哪裏放置? 當我將它放在應用程序build.gradle中時,出現以下錯誤: 錯誤:配置項目':app'時發生問題。 >無法解析配置':app:_debugApkCopy'的所有依賴關係。 >找不到com.google.gms:google-services:9.0.0。 必需: MedRemind:應用程序:未指定 –

+0

將它放在您的應用程序構建gradle上,並將其從項目gradle中移除。 「Google Play服務已過時」。錯誤表示您的播放服務版本太舊 – Aznhar

+0

您必須首先下載google API 25 – Aznhar

2

清理項目和重建,如果沒有工作,然後你可以參考this post

0

您的模擬器系統映像沒有Google Play服務的最新修訂版本(10.2.98)。

從Android Studio中,打開SDK管理器並檢查顯示包詳細信息框。由於您正在使用API​​ 23圖像進行測試,請向下滾動到Android 6.0部分。使用Google API的格式更新模擬器映像...系統映像。最新的版本是20

當你運行模擬器,可以確認您要設置>應用擁有最新版本,滾動到谷歌播放服務,並點擊看到的版本號應用信息

0

我通過將手機中的Google Play服務從8.0更新到11.0來解決了這個問題。

0

我剛剛解決了我的問題bro,我認爲你只需要重新同步firebase,按照這一步點擊tab工具 - > firebase - >選擇firebase功能之一 - >如果連接的按鈕是灰色的,您必須重新同步Firebase,它會將Firebase配置更新爲最新版本。希望它會有所幫助。