Flutter:无法将firebase_auth软件包从0.5.11更新到0.6.6

时间:2018-12-17 21:17:38

标签: firebase firebase-authentication flutter

我正在尝试更新软件包以解决this problem。当我在pubspec.yaml上更改firebase_auth版本时,会得到以下信息:

错误

Configure project :firebase_auth

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 ':firebase_auth'.
> Could not open cp_proj remapped class cache for 1hd54il9uhc3eutyaybhw2pq0
(~/.gradle/caches/4.10.2/scripts-remapped/build_7iuv4c9gs2g2ad3uvhc3eae18/1hd54il9uhc3eutyaybhw2pq0/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: ~/git-repo/mine-repo/printer_products/android/gradlew app:properties


Please review your Gradle project setup in the android/ folder.

pubspec

dependencies:
   flutter:
      sdk: flutter

   #firebase_auth: ^0.5.11
   firebase_auth: ^0.6.6
   google_sign_in: ^3.0.4
   firebase_core: ^0.2.5+1
   cloud_firestore: ^0.7.3

   firebase_storage: ^1.0.4
   image_picker: ^0.4.10
   http: ^0.12.0
   uuid: ^1.0.3
   mime: ^0.9.6+2
   shared_preferences: "^0.4.3"
   rxdart: "^0.19.0"
   scoped_model: "^1.0.1"

似乎只有firebase_auth:0.5.11和google_sign_in:3.0.4的组合才有效。

1 个答案:

答案 0 :(得分:1)

当我意识到问题不是直接由软件包及其更新引起的时,我找到了解决此问题的方法。我只是删除了错误中提到的缓存:rm -rf ~/.gradle/caches/4.10.2