【发布时间】:2018-05-09 18:41:07
【问题描述】:
首先:我用谷歌搜索了“颤振医生”并搜索了您的 网站也是如此。我将在下面详细说明我的结果,但在此之前是我所在的位置:
1) 我按照https://flutter.io/setup-windows/ 的指示进行操作,直到无法继续。
2) 我的环境是: Windows 10、64 位、210 Gb 可用空间 Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz; 8.00 GB 安装内存(RAM)
I have PowerShell 5.1,
I have setup Git for Windows with "Use Git from
the Windows Command Prompt" option
I am able to run git from the command prompt or power shell
3) 我尝试下载测试版的 .zip,但是当我运行 “颤动医生”命令它刚刚挂起。
4) 现在是搜索结果: 我发现了 3 个相关问题:
a) “让 Flutter 医生开始工作” - 我尝试克隆“alpha”版本 并检查“后台智能传输服务正在运行”(它 是)。
b) “运行 Flutter Doctor 没有任何结果” - 我删除了 alpha 版本 并使用 git bash 克隆了 beta 版本,结果如下:
rex@NEXIUM MINGW64 /c/flutter
$ git clone -b beta https://github.com/flutter/flutter.git
Cloning into 'flutter'...
remote: Counting objects: 122267, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 122267 (delta 0), reused 0 (delta 0), pack-reused 122262
Receiving objects: 100% (122267/122267), 37.56 MiB | 2.39 MiB/s, done.
Resolving deltas: 100% (91730/91730), done.
Checking out files: 100% (2473/2473), done.
This also did not work (i.e. flutter doctor still hangs)
c) “Flutter doctor 没有在命令提示符下运行”——这个是最多的 有希望的结果:
I deleted the cache folder under the ..\AppData\Roaming\Pub directory.
when I ran "flutter doctor" this time I got the following results:
C:\Users\rex>flutter doctor
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 09d05a38912a3c1a906e95099cac9a7e14fae85f...
Unzipping Dart SDK...
// here there was some text above the ========== in the console about bits...
// which went away, window appeared compressed and then the following message:
Updating flutter tool...
// HANGS HERE
我希望安装 Flutter 工具并尝试使用它来开发 Android 和/或 iOS 应用程序。我在 Visual Studio 2017 中使用 Xamarin 进行了一些开发,但对控件的支持有限,我是 希望这个工具会更有效率。如果有人可以帮助我解决这个问题,我将不胜感激。谢谢, 雷克斯
以下新信息:
我尝试在具有管理员权限的命令窗口中运行颤振医生命令,结果相同。然后它尝试使用一些 echo 命令编辑 flutter.bat 文件,以尝试获取其他信息,这些信息表明批处理文件正在执行以下语句:
>CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
我编辑了批处理文件以取消注释分配给我附加信息的 FLUTTER_TOOL_ARGS 的行,批处理文件退出如下:
================== 命令窗口中的结果=====================
>C:\Windows\System32>flutter doctor
>in acquire_lock ... # ECHO to get debug information
>in subroutine ... # ECHO to get debug information
>in after_subroutine ...# ECHO to get debug information
>dart - C:\src\flutter\flutter\bin\cache\dart-sdk\bin\dart.exe # ECHO dart
>FLUTTER_TOOL_ARGS ""--checked " --observe=65432" # ECHO FLUTTER_TOOL_ARGS
#next line is ECHO of snapshot_path
>snapshot_path C:\src\flutter\flutter\bin\cache\flutter_tools.snapshot
============== the following was output from the batch file =========
Unhandled exception:
Could not load "file:///C:/Windows/System32/%20--observe=65432":
FileSystemException: Cannot open file, path =
'C:\Windows\System32\ -->observe=65432'
(OS Error: The system cannot find the file specified. , errno = >2) null
# another ECHO
after CALL ... # echo to get debug information
====================================================================================== /p>
=========== 另一个新编辑 =============
为了澄清上述编辑,我完全删除了与颤振相关的所有内容,然后将其重新安装/解压缩到另一个不需要管理员权限编辑等的目录“C:\src\flutter”中,但我做到了不要像以前那样删除 ..\AppData\Roaming\Pub 目录下的缓存文件夹,所以我今天早上要回去做。我还将在命令提示符下使用 -v 或 -verbose 选项来查看是否有任何其他帮助,并在完成后添加新信息。
============== 后续编辑 =================
我去掉了一些debug ECHO语句,修改了一些,确保7z.exe在路径中,去掉了缓存目录但结果基本一致如下:
C:\WINDOWS\system32>flutter doctor -verbose
Show dart, FLUTTER_TOOL_ARGS, and snapshot_path:
dart - C:\src\flutter\flutter\bin\cache\dart-sdk\bin\dart.exe
FLUTTER_TOOL_ARGS ""--checked " --observe=65432"
snapshot_path C:\src\flutter\flutter\bin\cache\flutter_tools.snapshot
execute call to dart ...
Unhandled exception:
Could not load "file:///C:/Windows/System32/%20--observe=65432":
FileSystemException: Cannot open file, path =
'C:\Windows\System32\ --observe=65432' (OS Error: The system cannot find
the file specified., errno = 2)
null
returned from call to dart
exit code 255
C:\Windows\System32>
============ Another Update ===========
我决定再次尝试克隆测试版,因为这是我之前所做的所有事情中最有希望的。完成后,我使用了 power shell 并发出了“flutter channel”命令,看看它会做什么。令人惊讶的是,我得到了与之前运行“颤振医生”类似的结果。首先,屏幕顶部有一个输出显示 dart 正在下载,然后在完成后,控制台上会在原始命令下方打印以下内容:
C:\Users\rex>flutter channel
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine
1ed25ca7b7e3e3e8047df050bba4174074c9b336...
Unzipping Dart SDK...
Updating flutter tool...
然后控制台像以前一样挂起......
我终于中止了命令并在 flutter.bat 中设置了 echo on。该文件挂起,屏幕上显示以下命令(都在同一行):
C:\src\flutter>CALL "C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe"
"--checked --observe=65432"
"C:\src\flutter\bin\cache\flutter_tools.snapshot" doctor
在这一点上,我几乎不知所措。
【问题讨论】:
标签: installation flutter