Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I connect Flutter with Genymotion?

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.

like image 731
Torhonye Avatar asked Feb 22 '19 11:02

Torhonye


3 Answers

  1. Install the Genymotion plug-in for Android Studio (Within AS: Tools > SDK Manager > Plugins > Genymotion). Restart AS

  2. Configure the SDK within Genymotion (Genymotion > Preferences > ADB > Use custom Android SDK tools) then use the path /Users/{Your user}/Library/Android/sdk (default location after installing AS)

  3. Create a new device within Genymotion

  4. Configure correct Genymotion path within AS:

    a. View > Toolbars (to display the Genymotion icon if not default appearing)

    b. Press the Genymotion icon in the toolbar (appears next to magnifying glass at the right hand side)

    c. Point the path to the Genymotion folder location (eg: /Applications/Genymotion)

    d. Close the box

Now you are set up, so in future press the icon, select your emulator and run to launch within Android Studio. This will be detected by flutter when trying run apps using flutter run command.

like image 183
SenAnan Avatar answered Oct 08 '22 17:10

SenAnan


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.

like image 21
Payam Khaninejad Avatar answered Oct 08 '22 16:10

Payam Khaninejad


1) Install genymotion correctly. you can see here: [https://www.genymotion.com/plugins/][1]
  1. install the Genymotion plugin for Android Studio
2-1) In Android Studio, go to File/Settings (for Windows and Linux) or to Android Studio/Preferences (for Mac OS X)
2-2) Select Plugins and click Browse Repositories.

2-3) Right-click on Genymotion and click Download and install.

This is what you need to do if the genymotion icon don't apper.

2-4) To see Genymotion plugin icon, display the toolbar by clicking View > Toolbar.

After the last step, I can see the icon now and run my app with genymotion.

I hope this helps your problem, since after struggling to find it works for me

like image 1
M E S A B O Avatar answered Oct 08 '22 16:10

M E S A B O