【问题标题】:Is it necessary to install Android Studio for flutter or what can be replacement for android studio?是否有必要安装 Android Studio 以实现颤振或什么可以替代 android studio?
【发布时间】:2019-12-02 06:17:14
【问题描述】:

我正在使用 vscode 并安装了颤振插件、飞镖插件等,但我仍然找不到我的设备以及我发现以下问题

[flutter] flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows 
[Version 10.0.18362.239], locale en-IN)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: 
https://developer.android.com/studio/index.html
  On first launch it will assist you in installing the Android SDK components.
  (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
  If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
  You may also want to add it to your PATH environment variable.

[!] Android Studio (not installed)
[√] VS Code (version 1.36.1)
[!] Connected device
! No devices available

! Doctor found issues in 3 categories.

【问题讨论】:

    标签: android-studio flutter dart visual-studio-code mobile-application


    【解决方案1】:

    您需要安装 Android Studio 才能获得 Android SDK。使用 Android Studio 获取 Android SDK 后,即可继续使用 VScode 进行 Flutter 开发。

    希望这个答案有帮助!

    【讨论】:

    • 是的,我下载了android studio,然后我正在使用VScode,谢谢你的帮助
    【解决方案2】:

    您将需要 Android SDK 才能开发 Android 应用程序。如果您不想安装 Android Studio,那么您必须使用命令行工具。 https://developer.android.com/studio#downloads

    如果您习惯使用命令行,那么您可以这样做。 https://developer.android.com/studio/command-line

    【讨论】:

    【解决方案3】:

    你并不特别需要Android Studio,你只需要Android SDK,下载它并将环境变量设置为SDK路径以便flutter安装识别。

    可以参考这篇中篇文章:https://medium.com/@sadabwasim/flutter-in-linux-37d32890745b

    【讨论】:

      【解决方案4】:

      第一个问题,您可以在flutter doctor日志中看到x标记:

      [X] Android toolchain - develop for Android devices
          X Unable to locate Android SDK.
            Install Android Studio from: 
      https://developer.android.com/studio/index.html
        On first launch it will assist you in installing the Android SDK components.
        (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
        If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
        You may also want to add it to your PATH environment variable.
      

      这意味着您还没有 Android SDK 或者您还没有设置 Android SDK 的路径。

      第二期

      ! No devices available
      

      说明你没有安装设备驱动或者你的操作系统无法识别设备。

      最后

      flutter 需要安装 Android Studio 还是可以替代 android studio?

      无需安装 Android Studio。但我认为您需要使用 IntelliJ 或 Android studio 而不是 VS Code。这是因为 InteliJ 或 Android Studio 作为成熟的 IDE 比仅作为编辑器的 VS Code 具有更多的功能。

      【讨论】:

        猜你喜欢
        • 2016-11-01
        • 1970-01-01
        • 1970-01-01
        • 2020-04-26
        • 1970-01-01
        • 1970-01-01
        • 2018-08-31
        • 2021-06-21
        • 2020-11-08
        相关资源
        最近更新 更多