`Unresolved reference: android` on new Flutter project `Unresolved reference: android` on new Flutter project flutter flutter

`Unresolved reference: android` on new Flutter project


In my case, File -> Invalidate Caches / Restart worked. When Android Studio started back up, the issue was gone. Doesn't really answer the "why", but... it worked.


Configure to the project SDK to the appropriate API level as per your project will solve your issue(shown in the dialog after clicking Setup SDK at right corner).

enter image description here


For the "Unresolved reference: android” Issue.

It occurs because the project is not able to configure the Android SDK.

Go to File-> Project Structure -> Project SDK [Set the correct SDK as per your project]

And then,

ReSync the project. (Invalidate caches and restart, if required)