由于未知原因导致android studio无法启动,
https://www.resume-next.com/android-studio-no-longer-starts-after-updating/
参照上一页重新安装,并选择“卸载以前的版本”。
在那之后,我可以开始一个新版本的android studio,
https://flutter.dev/docs/cookbook/testing/unit/mocking
如果您按照上面页面上的描述运行测试,
../flutter/packages/flutter/lib/material.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.8.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../flutter/packages/flutter_test/lib/src/_goldens_io.dart:5:1: Error: The specified language version is too high. The highest supported language version is 2.8.
// @dart = 2.10
^^^^^^^^^^^^^^^
../flutter/packages/flutter_test/lib/src/_goldens_io.dart:65:48: Error: This requires the 'non-nullable' experiment to be enabled.
Try enabling this experiment by adding it to the command line when compiling and running.
LocalFileComparator(Uri testFile, {path.Style? pathStyle})
^
../flutter/packages/flutter_test/lib/src/_goldens_io.dart:69:42: Error: This requires the 'non-nullable' experiment to be enabled.
Try enabling this experiment by adding it to the command line when compiling and running.
static path.Context _getPath(path.Style? style) {
^
../flutter/packages/flutter_test/lib/src/_goldens_io.dart:73:50: Error: This requires the 'non-nullable' experiment to be enabled.
Try enabling this experiment by adding it to the command line when compiling and running.
static Uri _getBasedir(Uri testFile, path.Style? pathStyle) {我得到了上面的错误。
颤动医生的结果如下所示。
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.7 19H2, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Android Studio (version 4.0)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.这是否需要安装Flutter和Dart?
然而,在这一点上,其他代码(默认计数器应用程序等)可以正常执行,所以我认为Flutter和Dart已经安装好了。
然而,我认为颤动医生的结果是“安装颤动和飞镖”。
Mac重启,运行颤动清理运行颤动升级我在上面试过了,但它没有改变。
我该怎么办呢。

发布于 2020-10-29 12:06:45
按Ctrl - Alt -S(设置)
然后选择[插件
然后搜索颤动
然后安装它
然后它将提示安装dart
然后你就可以走了
如果这不起作用,那么在你的机器上安装flutter,并设置android studio,试试这个youtube视频https://www.youtube.com/watch?v=BDRQxfWrozY
快乐编码
https://stackoverflow.com/questions/64582527
复制相似问题