简体   繁体   中英

Files highlighted with red color with flutter in Android Studio

Okay, I recently installed flutter and android studio. Everything is working fine...

Flutter doctor shows "NO issue" -- all clear there.

Flutter Applications Builds and Runs fine, but what irritates me is the folders highlighted in red in left panel (project view).

'dart_tool' and all folders inside 'idea' || errors

I've read many forums, searched online, but couldn't solve it.

Also when I tried to commit to git it showed error (above picture)

eg: @style/NormalTheme shows red while below image shows the style.xml has NormalTheme

style.xml here

I don't want any vcs for now, just those red highlighted folders are irritating and want to get rid of it.

Okay so I found out that the red folders are representing "Excluded Directories", and those are the directories which won't be "Indexed" by the Android Studio so when you open your project It can load much faster.

Excluded Directories are not Indexed because we won't be working with those, so at the moment the Android Studio doesn't know what, when, where they are related to (not indexed), hence it shows errors, but actually those files are correct.

You can just exclude/include any folder (Warning: It may cause you trouble analysing the code, which shows red everywhere) by right-clicking it and choosing "Mark Directory as " > "Excluded/Remove Excluded".

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