I have my flutter app built and running on macOS using the following command.
flutter run
This is great.
Now, I want to run my app on an Android device. It has developer mode enabled and getting recognised when I run adb devices
. I have also run other apps on my Android device. So, I am sure the android device is well set for android development.
But now when execute flutter run
, my app still runs on macOS instead of Android device. I did a flutter build apk
which built my app for android. But, flutter run
still runs on Mac instead of Android.
Isn't there a flutter run
command to run the build on Android specifically?
flutter devices
command show? – Philisflutter devices
showed that my device was not authorised. This was stupid. I had it authorised for multiple other run sessions. But, your suggestion got me to find the root cause of my problem. Please feel free to post an answer and I can accept it. – Weedenflutter run
's target as Android, I would like to know that. That was my original question as well. – Weedenflutter -v -d your_android_device run
(-v
is optional: it stands for "verbose") – Philis