简体   繁体   中英

Flutter dart showing errors

I've installed flutter on Android studio whenever I import a new project on Android studio it shows "Dart not configured Download Dart SDK or Open Dart settings"

显示这个

The code was fine till now.

When I open the dart settings & select flutter path & hit on apply all the code starts showing errors.

整个代码充满了错误

Idk what to do tried with every project only when making a new flutter project is working fine. Flutter version is 2.8.1 Dart version is 2.15.1 Android Studio Arctic Fox | 2020.3.1 Patch 4

Have you installed the flutter sdk with terminal or by downloading the directory? If it's the later, first make sure to select the right dart sdk path in the settings. It's in your_flutter_directory/bin/cache/dart-sdk and then flutter sdk path. After this try running flutter pub get to see if it works.

Make sure you installed the Dart properly , as Android Studio indicates it in your first Screenshot. Also see here . If this is your case make sure that you choose the correct SDK Location , which you selected during installation. Also make sure, that the Flutter SDK Path is correctly set up under File->Settings->Language & Framework->Flutter.

If this does not help check out suggested solutions here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM