Skip to content

flutter doctor and xcode-select disagree on whether XCode is installed #6308

Closed

Description

@Hixie

flutter doctor and xcode-select disagree on whether XCode is installed on my laptop:

ianh-macbookair:~ ianh$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
ianh-macbookair:~ ianh$ flutter doctor
[✓] Flutter (on Mac OS, channel master)
    • Flutter at /Users/ianh/dev/flutter
    • Framework revision 040a080541 (3 hours ago), 2016-10-13 11:13:31
    • Engine revision cf774d580c
    • Tools Dart version 1.20.0-dev.10.2

[✓] Android toolchain - develop for Android devices (Android SDK 24.0.3)
    • Android SDK at /Users/ianh/Library/Android/sdk
    • Platform android-24, build-tools 24.0.3
    • Java(TM) SE Runtime Environment (build 1.8.0_102-b14)

[-] iOS toolchain - develop for iOS devices
    x XCode not installed; this is necessary for iOS development.
      Download at https://developer.apple.com/xcode/download/.
    x ideviceinstaller not available; this is used to discover connected iOS devices.
      Install via 'brew install ideviceinstaller'.
    x ios-deploy not available; this is used to deploy to connected iOS devices.
      Install via 'brew install ios-deploy'.

[x] Flutter IDE Support (No supported IDEs installed)
    • Atom - https://atom.io/
    • IntelliJ - https://www.jetbrains.com/idea/

[✓] Connected devices
    • None
ianh-macbookair:~ ianh$ 

Activity

  1. tomnewton commented on Nov 1, 2016

    @tomnewton

    I have the same issue:

    `$ flutter doctor
    [✓] Flutter (on Mac OS, channel master)
    • Flutter at /Users/tom.newton/workspace/dart/flutter
    • Framework revision 4046db9 (5 hours ago), 2016-10-31 23:01:39
    • Engine revision 63e7180
    • Tools Dart version 1.21.0-dev.2.0

    [✓] Android toolchain - develop for Android devices (Android SDK 25.0.0)
    • Android SDK at /Users/tom.newton/Library/Android/sdk
    • Platform android-25, build-tools 25.0.0
    • Java(TM) SE Runtime Environment (build 1.8.0_102-b14)

    [-] iOS toolchain - develop for iOS devices
    x XCode not installed; this is necessary for iOS development.
    Download at https://developer.apple.com/xcode/download/.

    [✓] IntelliJ IDEA Ultimate Edition (version 2016.2.5)
    • Dart plugin installed
    • Flutter plugin installed

    [✓] Connected devices
    • None`

  2. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-macosBuilding on or for macOS specifically
    on Nov 1, 2016
  3. eseidelGoogle commented on Nov 1, 2016

    @eseidelGoogle
    Contributor

    https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/ios/mac.dart which helps flutter doctor decide if xcode is installed. Patches most welcome. :)

    FYI @danrubel

  4. tomnewton commented on Nov 2, 2016

    @tomnewton

    I found that this fix solves the issue: http://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error

    1. Install Xcode (get it from https://developer.apple.com/xcode/) if you don't have it yet.
    2. Accept the Terms and Conditions.
    3. Ensure Xcode app is in the /Applications directory (NOT /Users/{user}/Applications).
    4. Point xcode-select to the Xcode app Developer directory using the following command:
    5. sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

    Run flutter doctor - all fixed.

  5. cbracken commented on Feb 9, 2017

    @cbracken
    Member

    Fixed by #8012

  6. imaltai commented on Mar 3, 2018

    @imaltai

    tomnewton's solution worked!

  7. eadafonso commented on Sep 12, 2018

    @eadafonso

    Good night guys I have flutter installed on my Mac but I can not run the application because I'm using Xcode 8.2, my mac does not support version 9 of xcode has how to run the application in version 8?

    If so, help me.

  8. added a commit that references this issue on Sep 22, 2018
  9. neelu004 commented on Apr 24, 2019

    @neelu004

    Hi, I am adding the dependency of shared_preference and it is working fine when I am running my project on android using windows but when I am using Mac(Xcode) it is giving me error as ld: warning: directory not found for option '-L/Users/ghanshyam/Development/Android/Workspace/my_app/build/ios/Debug-iphoneos/shared_preferences'
    ld: library not found for -lshared_preferences
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    I had tried using the following methods but that doesn't works for me. They are:-
    pod install
    pod upgrade
    flutter clean
    flutter packages get
    flutter packages upgrade
    flutter run using command it is working fine but works on simulator still could not run on my real iPhone device using the same command.
    also when I am using flutter build ios, this will creates the Runner.app but how can I install this Runner.app on my iPhone device.
    Please suggest some solution for the same.
    Thanks!

  10. daktari01 commented on Mar 4, 2021

    @daktari01

    Installing XCode from the app store solved the issue for me.

  11. github-actions commented on Aug 5, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform-macosBuilding on or for macOS specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions