cnzfq
V2EX  ›  Flutter

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

  •  
  •   cnzfq · Dec 13, 2020 · 5446 views
    This topic created in 2001 days ago, the information mentioned may be changed or developed.
    今天尝试在 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 replies    2021-03-26 03:45:11 +08:00
    ciki
        1
    ciki  
       Dec 14, 2020
    第一个我也遇到了
    第二个是 stable 分支的 bug,切换到 master 就行了
    connyyue
        2
    connyyue  
       Dec 30, 2020
    这个报错是因为找不到插件
    Android Studio 从 4.1 开始变更了本地目录 插件地址和配置文件地址都变了

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

    ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
    cnzfq
        3
    cnzfq  
    OP
       Dec 31, 2020
    @connyyue 感谢,果然跑通了。谢谢!
    @ciki 二楼的 connyyue 兄弟提供了方案,在我这可行,顺便 @你尝试一下。
    bigtotoro
        4
    bigtotoro  
       Jan 5, 2021
    这个跟 M1 其实也没个关系
    snowhunter
        5
    snowhunter  
       Jan 20, 2021
    还没入手 m1,都 flutter 了,我都用 iPhone simulator 开发
    ibcker
        6
    ibcker  
       Mar 26, 2021
    为什么这么想不开用安卓模拟器
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2978 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 07:50 · PVG 15:50 · LAX 00:50 · JFK 03:50
    ♥ Do have faith in what you're doing.