"Could not find method platform()" after Firestore upgrade for Flutter project

Viewed 553

I just upgraded to Firestore 0.14.4 from 0.13.* for my VSCode/Flutter project and am now getting the build errors below.

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\projects\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.14.4\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.12.0] 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.

* Get more help at https://help.gradle.org
BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

My build.gradle file has the line classpath 'com.android.tools.build:gradle:3.3.2 which makes me think my gradle needs upgrading? So, I did the usual Google search but it didn't seem straightforward to upgrade gradle (though I'm sure I missed something). Does it sound like I need to upgrade and, if so, how do I do that?

0 Answers
Related