Tag: authentication

如何在数据模块中使用Android Kotlin Dagger 2和Firebase Auth?

我试图建立一个应用程序,其中data模块是一个库和presentation层是实际的Android应用程序。 理想情况下,我希望firebase依赖项仅存在于data模块中,但apply plugin: ‘com.google.gms.google-services’只能从presentation模块调用apply plugin: ‘com.google.gms.google-services’ 。 把匕首2和Firebase依赖关系放在一起给了我下面的错误: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ‘:presentation:transformDexArchiveWithExternalLibsDexMergerForDebug’. > java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex 删除Firebase身份validation依赖关系或匕首2依赖关系可解决此问题。 如何在data模块中同时使用这两个库? 我的build.gradle data apply plugin: ‘com.android.library’ apply plugin: ‘kotlin-android’ apply plugin: ‘kotlin-android-extensions’ apply plugin: ‘kotlin-kapt’ android { compileSdkVersion 26 buildToolsVersion ‘26.0.2’ defaultConfig { minSdkVersion […]

无法解析:com.google.firebase:firebase-auth:11.0.2

我只是更新SDK,谷歌播放服务和谷歌存储库,但仍然发生这种错误。 请帮助,我想要使用电话号码进行身份验证。 SDK管理器 logcat的 Build.gradle模块:Project // Top-level build file where you can add configuration options common to all sub-projects/module return buildscript { ext.kotlin_version = '1.1.3-2' repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:3.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files […]

无法解析:用于电话号码身份验证的com.google.firebase:firebase-auth:11.0.2

我更新了我的SDK,谷歌播放服务和谷歌存储库,但仍然发生这种错误。 请帮忙,我想要使用在firebase-auth:11.0.0中引入的电话号码进行身份验证,当降级到firebase-auth:10.0.0时,一切正常。 应用程序级别:Build.Gradle // Top-level build file where you can add configuration options common to all sub-projects/module return buildscript { ext.kotlin_version = '1.1.3-2' repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:3.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } […]