如何在 Android Studio 和 IntelliJ 中安装颤振和飞镖?

Posted

技术标签:

【中文标题】如何在 Android Studio 和 IntelliJ 中安装颤振和飞镖?【英文标题】:How to install flutter and dart in Android Studio and InttelliJ? 【发布时间】:2018-11-02 06:59:22 【问题描述】:

我遇到了安装问题。我跑步时得到以下信息 扑医生

[✓] Flutter (Channel beta, v0.4.4, on Mac OS X 10.11.6 15G19009, locale en)
    • Flutter version 0.4.4 at /Users/divyakrishnan/Development/flutter
    • Framework revision f9bb4289e9 (11 days ago), 2018-05-11 21:44:54 -0700
    • Engine revision 06afdfe54e
    • Dart version 2.0.0-dev.54.0.flutter-46ab040e58

[✓] android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/divyakrishnan/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Applications/Android Studio 3.0 Preview.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
    • All Android licenses accepted.

[!] ios toolchain - develop for iOS devices
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    ✗ libimobiledevice and ideviceinstaller are not installed. To install, run:
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ✗ ios-deploy not installed. To install:
        brew install ios-deploy
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.io/platform-plugins
      To install:
        brew install cocoapods
        pod setup

[✓] Android Studio
    • Android Studio at /Applications/Android Studio 3.0 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[!] IntelliJ IDEA Community Edition (version 2018.1.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[!] Connected devices
    ! No devices available

我在 Android Studio 3.0 和 IntelliJ 中看不到颤振或飞镖插件。

【问题讨论】:

打开 android studio 去 File -> Project -> Plugins 并在那里安装flutter插件 另外你不需要IDEA和去Flutter医生提供的链接(iOS工具链) 【参考方案1】:

默认情况下,Android Studio 或 IntelliJ 不会安装这些插件。您需要按照this page 中的说明自行安装它们:

安装 Flutter 和 Dart 插件

Flutter 有两个插件支持:

Flutter 插件支持 Flutter 开发人员工作流程(运行、调试、热重载等)。 Dart 插件提供代码分析(键入时的代码验证、代码完成等)。

要安装这些:

    启动 Android Studio。 打开插件首选项(macOS 上为 Preferences>Plugin,Windows 和 Linux 上为 File>Settings>Plugins)。 选择Browse repositories...,选择Flutter插件并点击install。 在提示安装 Dart 插件时单击。 出现提示时点击重新启动

【讨论】:

【参考方案2】:

只需按照以下步骤操作:

    转到插件。

    浏览存储库。

    搜索颤振。

    点击安装(会弹出一个关于 dart 依赖关系的对话框。点击是)。

    安装完成后重启android studio。

希望对你有帮助。

【讨论】:

【参考方案3】:

我遇到了同样的问题,这些是解决我的问题的步骤 (Install the Flutter and Dart plugins):

    启动 Android Studio。 打开插件首选项(Configure > Plugins v3.6.3.0later)。

注意:在 v3.6.3.0 之前,应遵循:打开插件首选项 (macOS 上的首选项> 插件文件> Windows 和 Linux 上的设置 > 插件

    选择 Flutter 插件并点击安装

    在提示安装Dart 插件时单击

    出现提示时点击重新启动

运行flutter doctor。你应该得到这个输出:

【讨论】:

【参考方案4】:

这是flutter安装Android Studio的步骤:

1.Go to Settings->Plugin->Install Flutter and Dart->Restart Android Studio
2.Download  the flutter sdk
3.In the environment Variable->User Variable->
ANDROID_HOME F:\AndroidSDK(Paste your Android SDK Path)
Path:F:\AndroidSDk;(Paste your Android SDK Path)
     c:\ProgramFiles\Java\jdk\1.8.0_20\bin;(Paste your jdk Path)
     c:\Users\Desktop\flutter\bin;(Paste your Flutter SDK Path)
4.Git install at c:\ProgramFiles\Git
5.Open Gitbash
$flutter doctor
$flutter doctor --android-licenses
Accept the licences Y Y Y Y
Make sure your Device should be connected your PC   

【讨论】:

【参考方案5】:

在 Android Studio 中安装 Flutter 和 Dart 插件非常简单—— 按照步骤安装-

    点击配置 --> 插件 从搜索框中浏览 Flutter 存储库 点击安装按钮 点击Yes从Alter提示安装Dart插件 完成所有过程后重新启动 Android Studio 以激活 插件

更多信息Click here to find detail steps with graphical inteface

【讨论】:

【参考方案6】:

最重要的事情之一总是“以管理员身份运行”您的 IDE,即 Android .. 等。 为了flutter避免几个错误。

【讨论】:

【参考方案7】:

VS Code

中安装 Flutter 和 Dart 插件
    开始 VS Code。 调用视图>命令面板…. 键入“安装”,然后选择扩展:安装扩展。 在扩展搜索字段中输入“flutter”,在列表中选择Flutter,然后点击Install。这也会安装所需的 Dart 插件。

使用 Flutter Doctor 验证您的设置

    调用视图>命令面板…. 输入“医生”,然后选择Flutter: Run Flutter Doctor。 查看 OUTPUT 窗格中的输出是否有任何问题。确保从不同输出选项的下拉列表中选择 Flutter。

【讨论】:

【参考方案8】:

我自己找到了这个解决方案,所以没有证据或详细信息的链接。

我尝试通过 Android Studio (File - Settings - Plugins - Market Place) 安装 Dart 和 Flutter 插件。每次安装后都会显示Restart IDE。每次重启 Android Studio 后使用显示Disable Flutter plugin or install Dart。 经过多次尝试(通过上述选项安装 Dart),我做了什么我进入了

*\.AndroidStudio4.0\system\plugins

flutter-intellij.zipDart-*.*.zip 文件复制到

*\.AndroidStudio4.0\config\plugins

刚刚解压了这两个文件(使用了在此处提取选项)并启动了 android studio,错误消失了,Android Studio 显示了一些数据收集消息。

现在我可以看到File -> New -> New Flutter Project ...

【讨论】:

以上是关于如何在 Android Studio 和 IntelliJ 中安装颤振和飞镖?的主要内容,如果未能解决你的问题,请参考以下文章

IntelliJ 是不是有 `Ctrl` + `K`、`Ctrl` + `D` Sublime 等价物?在 Android Studio 中使用 Alt+J 进行多项选择时如何跳过匹配项?

如何建立与 Android studio和 gradle android 库

如何建立与 Android studio和 gradle android 库

Android studio 中如何批量引入图片。一大堆图片!

如何在android studio中打开android文档和代码示例

如何在visual studio开发android程序