gpt4 book ai didi

android - 如何修复 flutter cloud_firestore 依赖项?

转载 作者:行者123 更新时间:2023-11-29 22:51:44 32 4
gpt4 key购买 nike

我正在开发用于测试 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.

我的应用程序将不再启动。我需要帮助。提前谢谢你。

最佳答案

更新:所以我将 cloud_firestore 版本更改为 0.3.0,它起作用了。

我觉得可能和sdk版本有关。我不知道。我不是专家。

environment:
sdk: ">=2.1.0 <3.0.0"

dependencies:
cloud_firestore: ^0.3.0
flutter:
sdk: flutter

关于android - 如何修复 flutter cloud_firestore 依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57832436/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com