2017-10-05 322 views
3

问题:使用Firebase身份验证的谷歌登录时,出现'开发人员错误'敬酒。用电子邮件和密码注册/进入工作正常。使用Firebase登录时出现错误

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.afollestad.material-dialogs:core:0.9.4.7' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 

//Firebase 
compile 'com.google.firebase:firebase-database:11.4.2' 
compile 'com.google.firebase:firebase-auth:11.4.2' 
compile 'com.firebaseui:firebase-ui-auth:2.3.0' 
compile 'com.google.android.gms:play-services-auth:11.4.2' 

compile 'com.android.support:appcompat-v7:26.0.1' 
compile 'com.android.support:support-v4:26.0.1' 
compile 'com.android.support:design:26.0.1' 

//testing 
compile 'com.google.code.findbugs:jsr305:2.0.1' 
testCompile 'junit:junit:4.12' 

compile 'com.github.bumptech.glide:glide:4.1.1' 
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1' 

compile 'agency.tango.android:material-intro-screen:0.0.5' 
} 

使用firebase ui auth的2.3.0版本时。代码构建但登录无效。使用3.0.0,如文档建议,显示了这个错误,并构建失败:

Error:Execution failed for task ':app:processDebugManifest'. 

清单合并失败:属性meta-data#[email protected]值=(26.0.1 )来自[com.android.support:support-v13:26.0.1] AndroidManifest.xml:28:13-35 也出现在[com.android.support:customtabs:26.1.0] AndroidManifest.xml:25: 13-35值=(26.1.0)。 建议:在AndroidManifest.xml:26:9-28:38处添加'tools:replace =“android:value”'以覆盖。

我试过升级到26.1.0构建工具,并将Android支持依赖更改为26.1.0版,但这并没有奏效。我不确定我现在想要做什么。另一块可能的相关信息是,我看到两个类在控制台(android studio)中未发现异常,它们是:

Class not found when unmarshalling: com.google.android.gms.auth.api.signin.internal.SignInConfiguration 
             java.lang.ClassNotFoundException 
Class not found when unmarshalling: com.google.android.gms.common.api.Scope 
             java.lang.ClassNotFoundException: 

更新! 当我将下面的代码添加到我的应用gradle文件中时,即使在使用firebase ui 3.0.0时,也会构建项目。尽管我尝试使用Google登录,但仍然得到开发人员的错误敬酒。

configurations.all { 
resolutionStrategy.eachDependency { details -> 
    def requested = details.requested 
    if (requested.group == 'com.android.support') { 
     if (!requested.name.startsWith("multidex")) { 
      details.useVersion '26.0.1' 
     } 
    } 
} 
} 

有什么建议吗?

回答

1

我忘了在Firebase控制台中添加SHA-1。:/

相关问题