首页 > 解决方案 > 当我使用 ./gradlew lintDebug 构建应用程序时,无法从 mavenCentral 获取 firebase-ui-auth

问题描述

我正在尝试将 android 应用程序库的来源从JCenter更改为MavenCentral,因为JCenter它将被关闭。

我已经检查过了,firebase-ui-auth v7.1.1并且v7.2.0在 中MavenCentral,但是当我使用 构建应用程序时./gradlew lintDebugfirebase-ui-auth找不到并且构建失败。

我还检查过,如果我使用 assembleDebug 构建,或者我在 AndroidStudio 上运行应用程序,构建成功并且应用程序在移动设备上运行。

我也尝试在 AndroidStudio 上创建一个新项目,并完成以下步骤,但构建仍然失败。

我在下面放了一些日志。知道为什么,以及如何解决吗?

谢谢!

./gradlew lintDebug:

 * What went wrong:
 Could not determine the dependencies of task ':app:lintDebug'.
 > Could not resolve all artifacts for configuration ':app:debugAndroidTestCompileClasspath'.
    > Could not find com.google.firebase:firebase-auth:.
      Required by:
          project :app > com.firebaseui:firebase-ui-auth:7.2.0

构建.gradle:

 buildscript {
 ...
   repositories {
     google()
     mavenCentral()
     ...
   }
   ...
 }
 
 allprojects {
     repositories {
         google()
         mavenCentral()
         ...
     }
 }
 
 ...

build.gradle(:app):

 ...
 
 dependencies {
 ...
   implementation "com.firebaseui:firebase-ui-auth:7.2.0" // or 7.1.1
 ...
 }

https://search.maven.org/artifact/com.firebaseui/firebase-ui-auth/7.2.0/aar

标签: androidfirebase-authenticationfirebaseuijcentermaven-central

解决方案


推荐阅读