您尚未登录。

#1 2023-05-16 01:57:16

awsl1414
会员
注册时间: 2023-03-28
帖子: 1

flutter环境异常

经过:我手贱误删了/opt/flutter内的部分内容,然后我重新安装了flutter(sudo pacman -S flutter)(过程报错),然后我直接删除了/opt/flutter,然后安装flutter(sudo pacman -S flutter)
结果:flutter环境异常
错误日志:
flutter doctor -v 
-------------------------------------------------------------------------------------------------------------
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this
source!

#0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1      _DefaultPub._runWithStdioInherited (package:flutter_tools/src/dart/pub.dart:447:7)
<asynchronous suspension>
#2      _DefaultPub.get (package:flutter_tools/src/dart/pub.dart:323:5)
<asynchronous suspension>
#3      PubDependencies.update (package:flutter_tools/src/flutter_cache.dart:125:5)
<asynchronous suspension>
#4      Cache.updateAll (package:flutter_tools/src/cache.dart:677:9)
<asynchronous suspension>
#5      FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:1518:7)
<asynchronous suspension>
#6      FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1336:27)
<asynchronous suspension>
#7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#8      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#9      FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:296:9)
<asynchronous suspension>
#10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#11     FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:244:5)
<asynchronous suspension>
#12     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:91:9)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14     main (package:flutter_tools/executable.dart:91:3)
<asynchronous suspension>

离线

#2 2023-05-16 23:25:24

Dee.H.Y
会员
注册时间: 2023-05-03
帖子: 11

Re: flutter环境异常

哈哈哈,相同的问题,完全猜不到问题出在哪里。

离线

#3 2023-05-17 00:01:31

Dee.H.Y
会员
注册时间: 2023-05-03
帖子: 11

Re: flutter环境异常

经过验证,直接将 /opt/flutter 的所有权设置为自己后可以正常使用(个人感觉 flutter 对自身的管理方式,并不适合使用包管理器管理)。

离线

页脚