首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Flutter SDK windows升级-访问被拒绝,找不到Cookie

Flutter SDK windows升级-访问被拒绝,找不到Cookie
EN

Stack Overflow用户
提问于 2021-02-16 18:18:49
回答 1查看 141关注 0票数 0

我在windows上,我试图升级到flutter sdk的最新版本,但下面的错误一直出现。仅供参考,我尝试了我在GitHub上找到的大多数修复程序。我从他们的文档中下载了压缩文件,并将其解压到文档中,因为它具有读/写权限、关闭防火墙、在PowerShell中运行flutter doctor -v等。

在运行flutter doctor -v之后,发生了这种情况

代码语言:javascript
复制
λ flutter doctor -v
Building flutter tool...
Running pub upgrade...
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/async_core.dart:28:1: Error: Error when reading '../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/async/cookies.dart': Access is denied.

export 'package:webdriver/src/async/cookies.dart';
^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/async/web_driver.dart:20:8: Error: Error when reading '../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/async/cookies.dart': Access is denied.

import 'package:webdriver/src/async/cookies.dart';
       ^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/sync_core.dart:35:1: Error: Error when reading '../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/sync/cookies.dart': Access is denied.

export 'package:webdriver/src/sync/cookies.dart';
^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/sync/web_driver.dart:25:8: Error: Error when reading '../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/sync/cookies.dart': Access is denied.

import 'package:webdriver/src/sync/cookies.dart';
       ^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/handler/json_wire_handler.dart:6:8: Error: Error when reading '../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/handler/json_wire/cookies.dart': Access is denied.

import 'package:webdriver/src/handler/json_wire/cookies.dart';
       ^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/handler/w3c_handler.dart:6:8: Error: Error when reading '../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/handler/w3c/cookies.dart': Access is denied.

import 'package:webdriver/src/handler/w3c/cookies.dart';
       ^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/async/web_driver.dart:175:3: Error: Type 'Cookies' not found.
  Cookies get cookies => Cookies(_client, _handler);
  ^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/sync/web_driver.dart:183:3: Error: Type 'Cookies' not found.
  Cookies get cookies => Cookies(_client, _handler);
  ^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/async/web_driver.dart:175:26: Error: The method 'Cookies' isn't defined for the class 'WebDriver'.
 - 'WebDriver' is from 'package:webdriver/src/async/web_driver.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/async/web_driver.dart').
Try correcting the name to the name of an existing method, or defining a method named 'Cookies'.
  Cookies get cookies => Cookies(_client, _handler);
                         ^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/webdriver-2.1.2/lib/src/handler/json_wire_handler.dart:52:34: Error: Method not found: 'JsonWireCookiesHandler'.
  final CookiesHandler cookies = JsonWireCookiesHandler();

我总是回到这个问题上来。有什么好办法吗?

EN

回答 1

Stack Overflow用户

发布于 2021-02-16 19:29:20

啊,真灵。仅供参考,我没有删除之前的SDK,而是将其放在D:\

以下是我的解决方案:

  • 我关闭了防火墙,并移动到旧的SDK文件夹(位于D:中)
  • 使用管理员权限运行CMD中的文件夹(我在ENV中使用flutter路径和以前的SDK
  • 的路径,然后运行:

<>F211

代码语言:javascript
复制
git clean -xfd
git stash save --keep-index
git stash drop
git pull
flutter doctor -v
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66222509

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档