繁体   English   中英

无法找到 android sdk Flutter Mac

[英]Unable to locate android sdk Flutter Mac

我是 flutter 的新用户,我安装了 android studio 和 flutter 插件。运行我的 flutter 医生时,它显示了。 我不知道如何解决它。 帮帮我。 我尝试了很多来修复它,但没有任何帮助

[✗] Android toolchain - develop for Android devices
    ✗ 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/docs/get-started/install/macos#android-setup
      for detailed instructions).
      If the Android SDK has been installed to a custom location, set
      ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.


[✗] Xcode - develop for iOS and macOS
    ✗ 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
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1248-b01)

[!] Android Studio
    • Android Studio at /Users/apple/Developer/flutter/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    ✗ Android Studio not found at /Users/apple/Developer/flutter/Contents
    • Try updating or re-installing Android Studio.

[!] Connected device
    ! No devices available

请 go 到 Project Structure 并解决一些错误。

Android Studio -> 文件 -> 项目结构。

请检查您是否在 android 工作室中安装了 dart 和 flutter 插件。

请在您的系统中安装 Dart。

您的项目中是否存在 local.properties 文件,在 android 文件夹内?

在此处输入图像描述

如果没有,则创建一个 local.properties 文件并将您的 android sdk 路径放入其中,就像我的情况一样

sdk.dir=/Users/tusharpandey/Library/Android/sdk

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM