Flutter/Dart - What do these red letters in my AndroidManifest.xml mean? Are they errors?

561

Solution 1

Nope, Android Studio can't understand the Android content when a Flutter project is opened.

It can either understand the Flutter directory structure when Flutter is opened. This is what enables Code Completion and other nice features when making Flutter apps.

If it's a simple Android project, then it can easily understand the Gradle files and your Java/Kotlin.

What this means for you as a Flutter developer is that, when you are editing native Android or iOS code. You will not get code completion. Android Studio will not be able to tell you about the errors in your code.

The Flutter team is working on this. So that you can have all the cool IntelliJ features for editing Native code EVEN when you have a Flutter project is opened.

Also, I think if you open the android separately, then you should be able to see properly. (Maybe, I'm not sure).

Solution 2

You can now open the Android part of your Flutter project by right clicking on the project name in the project window, choose Flutter and then Open Android module in Android Studio.

The opened Android project will have code completion and all the red letters will most likely turn other colors :)

A picture showing the project window

Share:
561
Meggy
Author by

Meggy

I'm a self-taught novice stumbling like a drunk through php, javascript, mysql, drupal and flutter.

Updated on December 24, 2022

Comments

  • Meggy
    Meggy over 1 year

    I'm getting red letters in my AndroidManifest.xml and don't understand what they mean. At the moment everything seems to be working as should. But will I get any problems down the road?

    AndroidManifest.xml part 1

    AndroidManifest.xml part 2