V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cnzfq
V2EX  ›  Flutter

MacBook Pro M1 使用 Android Studio 开发 Flutter 的两个情况

  •  
  •   cnzfq · 2020-12-13 14:32:58 +08:00 · 4325 次点击
    这是一个创建于 1222 天前的主题,其中的信息可能已经有所发展或是发生改变。
    今天尝试在 M1 搭配 Flutter 环境,

    1 、Android Studio 无法使用模拟器,毕竟不是 intel CPU 。想请问大家怎么应对相同情况的?
    2 、即使 Android Studio 安装了 Flutter 插件和 Dart,使用 flutter doctor 命令后依然报错,无法检测到这两个插件和 Connected Device 。不知是我配置疏漏,或是 M1 的通病,想了解一下大家的情况。

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B29 darwin-arm, locale
    zh-Hans-CN)

    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    [✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    [!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] VS Code (version 1.52.0)
    [!] Connected device
    ! No devices available

    ! Doctor found issues in 2 categories.

    另外,团队目前缺少一位 Flutter 专员,如果有意向加入、或是远程接外包 /兼职的朋友,也可与我联络。
    6 条回复    2021-03-26 03:45:11 +08:00
    ciki
        1
    ciki  
       2020-12-14 11:14:50 +08:00
    第一个我也遇到了
    第二个是 stable 分支的 bug,切换到 master 就行了
    connyyue
        2
    connyyue  
       2020-12-30 18:50:13 +08:00
    这个报错是因为找不到插件
    Android Studio 从 4.1 开始变更了本地目录 插件地址和配置文件地址都变了

    终端执行命令修改一下就好了

    ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
    cnzfq
        3
    cnzfq  
    OP
       2020-12-31 14:00:11 +08:00
    @connyyue 感谢,果然跑通了。谢谢!
    @ciki 二楼的 connyyue 兄弟提供了方案,在我这可行,顺便 @你尝试一下。
    bigtotoro
        4
    bigtotoro  
       2021-01-05 21:24:34 +08:00
    这个跟 M1 其实也没个关系
    snowhunter
        5
    snowhunter  
       2021-01-20 10:58:43 +08:00
    还没入手 m1,都 flutter 了,我都用 iPhone simulator 开发
    ibcker
        6
    ibcker  
       2021-03-26 03:45:11 +08:00
    为什么这么想不开用安卓模拟器
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4386 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:05 · PVG 12:05 · LAX 21:05 · JFK 00:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.