Android/Flutter错误合集
不定期更新╮( ̄▽ ̄")╭
1.Dart SDK is not configured.
Dart SDK is not configured.
1.解决
点击 File / Setting / Languages & Frameworks / Flutter,划线部分选择你下载的flutter的位置,然后确定,之后再次看图二dart的配置可看到只要flutter配置好了,dart也配置好了
2. ‘Packages get’ has not been run
'Packages get' has not been run
解决 点击如图,等待下载完成,之后重启Android Studio
3.error: The name ‘Router’ is defined in the libraries ‘package:fluro/src/router.dart (via package:fluro/fluro.dart)’ and ‘package:flutter/src/widgets/router.dart’. (ambiguous_import at [flutter_app] lib\routes\routes.dart:19)
4. Your Flutter application is created using an older version of the Android embedding. It’s being deprecated in favor of Android embedding v2. Follow the steps at
打开android目录下的app文件夹下的AndroidManifest.xml文件,在activity标签的下面增加如下代码:
<meta-data
android:name="flutterEmbedding"
android:value="2" />
再次点击get dependencies
|