0

我正在研究 Ionic Project ,在尝试使用 Cordova (ionic cordova build android) 构建 APK 时,我遇到了这个错误,尽管几天前它曾经完美地工作过。我尝试了所有在网络上提出的解决方案。任何帮助都会很好

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not find any version that matches com.google.firebase:firebase-core:18.0.+.
     Versions that do not match:
       - 11.0.4
       - 11.0.2
       - 11.0.1
       - 11.0.0
       - 10.2.6
       - + 35 more
     Required by:
         project :app

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
4

1 回答 1

0

这是一个常见的问题。不过,我通常会看到人们在使用 Google 服务时遇到问题。

我不知道确切的正确术语,但不同的软件包取决于不同的版本,它们不兼容。

当谷歌服务发生这种情况时,有些插件会自动修复这个问题,但我不确定这个。

您可以通过调整 Gradle 文件手动覆盖它。

通过确保所有与 firebase 相关的软件包都更新到package.json.

如果这不起作用,那么在 gradle 文件中查找所有不正确的引用并更新它们以针对单个通用版本将是一个更复杂的过程。

更新

我刚刚注意到你这样说:

尽管几天前它曾经完美地工作,但我遇到了这个错误

如果是这种情况,那么您在过去几天将哪个插件添加到您的项目中。它可能已经过时并且是您问题的原因。

于 2019-07-15T05:01:18.577 回答