【发布时间】:2020-01-09 22:43:51
【问题描述】:
我正在测试 cloud_firestore 的 Flutter 应用程序。 在我将“cloud_firestore: ^0.9.0”添加到我的 pubspec.yaml 之前,我的应用程序运行良好
dependencies:
flutter:
sdk: flutter
cloud_firestore:
我尝试将 cloud_firestore 的版本更改为 0.8.2 甚至根本不包含版本。但我仍然无法让它工作。 我还尝试将“android\app\build.gradle”中的 minSdkVersion 从 16 更改为 21。
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.baby_names"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
这是错误消息。
* Error running Gradle:
ProcessException: Process "D:\BeatMil\MakeApp\baby_names\android\gradlew.bat" exited abnormally:
> Configure project :cloud_firestore
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':cloud_firestore'.
> Could not open cp_proj remapped class cache for 9rdd22t0lqqejbejjys4b4x3q (C:\Users\anuto\.gradle\caches\4.10.2\scripts-remapped\build_d998a31vo7rwlu75ja03b8zq8\9rdd22t0lqqejbejjys4b4x3q\cp_proj70b1361a260e0ceb212a59c45f680ebd).
> Unexpected lock protocol found in lock file. Expected 3, found 0.
* 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 0s
Command: D:\BeatMil\MakeApp\baby_names\android\gradlew.bat app:properties
Please review your Gradle project setup in the android/ folder.
我的应用不再启动。我需要帮助。 提前谢谢你。
【问题讨论】:
-
你的应用使用androidX吗
-
不,我不这么认为。
-
更新您的应用以使用 androidX,然后尝试使用 cloud firstore v 0.12.9+3
标签: android gradle flutter google-cloud-firestore