首页 > 解决方案 > 缺少平台 android 所需的内容重新安装 xcode

问题描述

我有一个要构建 iOS 的颤振应用程序。我刚为此买了一台 MacBook Air,OS Catalina v. 10.15.6。自本周以来,我一直在努力从网站或 App Store 安装 Xcode,当我打开 Xcode 时仍然收到错误消息:缺少平台 android 所需的内容。请重新安装Xcode

在此处输入图像描述

我已经重新安装了 Xcode 3 次,所以这不是问题。

当我运行时flutter doctor,我首先有一个对话框说: git command requires the command line development tools.... 这是终端中的输出:

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    ✗ Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses
 
[!] Xcode - develop for iOS and macOS (Xcode 11.6)
    ✗ Xcode requires additional components to be installed in order to run.
      Launch Xcode and install additional required components when prompted or
      run:
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with
        is different from the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods. For more info, see
        https://github.com/flutter/flutter/issues/14293.
      To re-install CocoaPods, run:
        sudo gem install cocoapods
[✓] Android Studio (version 4.0)
[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories. 

请问有人知道这里有什么问题吗?

标签: androidiosxcodeflutter

解决方案


Try to setup xcode according to this: https://flutter.dev/docs/get-started/install/macos#ios-setup


推荐阅读