How do I connect Flutter with Genymotion?

2019-07-27 14:27发布

问题:

I have a problem with running my Flutter app on Android emulator using Genymotion.

After launch emulator, I have tried to "flutter run", but it didn't work. Console shows "No connected devices."

So how can I connect flutter with Genymotion? Could you tell me something? https://gyazo.com/7d75068683c043922c5fff75377e9817 https://gyazo.com/c9ccae04ffdfba3fa66fa6ff7e038e8f

The reason why I want to use Genymotion is Android Studio is too heavy.

But I wonder Flutter doesn't work on Genymotion without Android Studio.

回答1:

First Start the Genymotion emulator which you already downloaded an image and installed.

When emulator status is ON the open a command and run the following command:

flutter devices

If you see the installed image on output then like below then everything is fine:

PS F:\osx> flutter devices

1 connected device:

Samsung Galaxy S9 • 192.168.150.101:5555 • android-x86 • Android 8.0.0 (API 26)

Simply select the device on VScode or Android Studio and hit the run.