在Flutter中更新Firestore后,项目无法编译

时间:2020-08-21 08:27:43

标签: flutter gradle google-cloud-firestore

此错误会在编译时引发。

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.14.0+1\android\build.gradle' line: 54

* What went wrong:
A problem occurred evaluating project ':cloud_firestore'.
> Could not find method platform() for arguments [com.google.firebase:firebase-bom:25.3.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* 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.

build.gradle有什么问题?

1 个答案:

答案 0 :(得分:0)

解决方案是按照@Ronak的说明更新gradle,但更新为3.3.1,而不是5.0。