I have an existing native Android app to which I am adding a Flutter module (as new screens of the app will be written in Flutter).
This is my project structure:
native_project
app
flutter_module
network_module
.
.
.
I can get hot reload to work by opening the terminal and manually navigating to native_project/flutter_module
and then running flutter attach
. After that, changes to the Flutter files can be hot reloaded from the terminal by typing "r".
I don't want to use the terminal for hot reloading though. Instead, I want to be able to use the "hot reload" button in Android Studio but no matter what I do, it is always grayed out:
You can see both the "Flutter Hot Reload" button (the lighting icon) and the "Flutter attach" button (the device icon with the Flutter icon on it) are greyed out (they are greyed out even when hot reloading is working from the terminal).
How can I get those buttons to work on Android Studio?
Here is my Android Studio configuration for Flutter SDK and Dart SDK:
Have you added flutter sdk path in project setting? if not goto file -> settings -> languages and frameworks -> flutter -> then select flutter SDK from the dropdown.