对于我的Android应用程序,我尝试使用Firebase进行身份验证和数据存储。现在,我停留在身份验证上。当我的应用程序加载时,Android Studio控制台中会显示错误堆栈跟踪。Android Firebase身份验证不起作用
W/GooglePlayServicesUtil:无法找到Google Play服务包名称。
android.content.pm.PackageManager $的NameNotFoundException:com.google.android.gms
在android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:137)
在com.google.android .gms.internal.zzrt.getPackageInfo在com.google.android.gms.common.zze(未知来源)
在com.google.android.gms.common.zze.zzby(未知来源)
.zzbx(未知来源)
在com.google.android.gms.common.zze.zzbs(来源不明)
在com.google.android.gms.common.zze.isGooglePlayServicesAvailable(来源不明)
在COM。 google.android.gms.common.zzc.isGooglePlayServicesAvailable(未知来源)
在com.google.android.gms.common.GoogleApiAvailability.isGooglePlayServicesAvailable(未知来源)
在com.google.android.gms。 internal.zzqh $ zzc.connect(未知来源)
在com.google.android.gms.internal.zzqh $ zzc.zza(来源不明)
在com.google.android.gms.internal.zzqh.zza(来源不明)
在com.google.android.gms.internal.zzqh.handleMessage(未知来源)
在android.os.Handler.dispatchMessage(Handler.java:98)
在android.os.Looper.loop( Looper.java:148)
at a ndroid.os.HandlerThread.run(HandlerThread.java:61)
而当我尝试提交我的电子邮件和密码凭据时,会出现以下消息。
07-07 14:19:45.330 7430-7449/com.tech_centric.developmentworkflowfirebase W/DynamiteModule:用于com.google.firebase.auth本地模块描述符类未找到。
07-07 14:19:45.330 7430-7449/com.tech_centric.developmentworkflowfirebase W/GooglePlayServicesUtil:Google Play商店缺失。
我的项目/的build.gradle看起来是这样的:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
而且我的项目/应用程序/编译。gradle看起来像这样:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.tech_centric.developmentworkflowfirebase"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0-alpha2'
compile 'com.android.support:design:24.0.0-alpha2'
compile 'com.google.firebase:firebase-core:9.2.0'
compile 'com.google.firebase:firebase-auth:9.2.0'
}
apply plugin: 'com.google.gms.google-services'
有什么,我失踪,使这项工作?
您是在模拟器上还是在实际设备上启动应用程序?目标上是否安装了谷歌播放服务? – dthulke
@dthulke我正在模拟器上启动应用程序。如何检查模拟器上是否安装了谷歌播放服务? – Crimson1222
@dthulke我安装了它,但现在它给了我一个新的错误。 W/DynamiteModule:未找到com.google.firebase.auth的本地模块描述符类。 W/GooglePlayServicesUtil:Google Play服务已过时。需要9256000,但找到9080480 – Crimson1222