如何将Flutter与Genymotion连接起来? [英] How do I connect Flutter with Genymotion?

查看:286
本文介绍了如何将Flutter与Genymotion连接起来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Genymotion在Android模拟器上运行Flutter应用时遇到问题.

启动模拟器后,我尝试颤动",但是没有用.控制台显示没有连接的设备".

那我该如何将振颤与Genymotion连接起来?你能告诉我些什么吗? https://gyazo.com/7d75068683c043922c5fff75377e9817 https://gyazo.com/c9ccae04ffdfba3fa66fa6ff7e038e8f

我想使用Genymotion是Android Studio的原因.

但是我想知道Flutter在没有Android Studio的情况下无法在Genymotion上运行.

解决方案

  1. 为Android Studio安装Genymotion插件(在AS中:工具> SDK管理器>插件> Genymotion).重新启动AS

  2. 在Genymotion中配置SDK(Genymotion>首选项> ADB>使用自定义Android SDK工具),然后使用路径/Users/{您的用户}/Library/Android/sdk(安装AS后的默认位置)

  3. 在Genymotion中创建新设备

  4. 在AS中配置正确的Genymotion路径:

    a.查看>工具栏(如果未默认显示,则显示Genymotion图标)

    b.按下工具栏中的Genymotion图标(显示在右侧放大镜旁边)

    c.将路径指向Genymotion文件夹位置(例如:/Applications/Genymotion)

    d.关闭框

现在,您已完成设置,因此以后按该图标,选择模拟器,然后运行即可在Android Studio中启动.当尝试使用flutter run命令运行应用程序时,将由flutter检测到.

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. 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.

这篇关于如何将Flutter与Genymotion连接起来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆