Home > Net >  Android Studio: errors in Dart are not showing on the screen
Android Studio: errors in Dart are not showing on the screen

Time:02-23

I created a new project in Android Studio Bumble Bee. However when I enter some code that has errors in it the error is not showing up.

For example if I enter the following:

import './screens/authorization/auth_root_screen.dart';

When this directory or screen doesn't exist no error is shown.

Or even if I enter some code with a typo...

iiiiiiiiiiiiiiiiiiiiimport './screens/authorization/auth_root_screen.dart';

No error is shown in the IDE.

I guess I am missing a setting somewhere but I havent been able to find it. This always worked fine before I installed BumbleBee.

Any help would be gratefully received.

Thanks so much.

CodePudding user response:

Have you installed the Flutter extension for your Android Studio? You can find it in the Extensions section of your IDE.

CodePudding user response:

Come do these things

First, run this Flutter Doctor code in the terminal, be sure to check all the options

Specify the second SDK FLutter for Android Studio

Third, install the Dart and Flutter plugins

CodePudding user response:

Hi thanks for looking at this. I have solved it myself. I'll post the solution here in case anyone has a similar question.

Do the following:

  1. At the bottom of the Android Studio IDE is a tab called: Dart Analysis. Click on it to open the tab.

  2. On the left hand side of the Dart Analysis screen that opens is a settings Icon. Click on this.

  3. On the settings screen, make sure that "Scope Analysis to the Current Package" is ticked on.

Here is a screen print:

enter image description here

  • Related