6

I'm trying to follow the guideline to add an image into the splash screen. The project is built and runs as expected, but the resource in @mipmap/ic_launcher is red, and Android studio reports can not resolve symbols.

How can I fix it?

4
  • 3
    Open your project like this, does it still show the error? Commented Nov 11, 2018 at 6:54
  • 2
    Thank you. So it's not a good idea to open one single Android studio instance to work with Flutter. Instead, I should open an Android studio instance for the Android part, an XCode instance for the iOS part and at the end a whatever IDE for the dart/flutter part. Are you agree with this? Commented Nov 11, 2018 at 7:10
  • 1
    I agree with you. But the latest update of Flutter plugin for AS seems to provide some relief. Anyways did the link work for you? Commented Nov 11, 2018 at 7:42
  • Yes, thanks. It seems to work. ;) Commented Nov 11, 2018 at 7:47

2 Answers 2

6

When your Flutter project is open in Android Studio, it doesn't seem to respect all of the Android conventions in the android subfolder of the Flutter project.

As was noted in the comment link, though, you can go to File > Open and open the android folder. This will recognize it as an Android project and the resource errors should be gone.

That said, you don't need to open it as an Android project. You can just ignore the "errors" and it should work.

Sign up to request clarification or add additional context in comments.

Comments

0

You can also go to

Tools > Flutter > Open Android module in Android Studio

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.