Flutter研究(二)- 找不到設(shè)備

上文:iOS flutter研究(一)- 安裝

flutter_app打開(kāi)后,找不到設(shè)備(模擬器、真機(jī))

一、配置環(huán)境變量

$ export PATH=$PATH:/Library/flutter/bin

二、運(yùn)行run flutter doctor

$ flutter doctor

運(yùn)行結(jié)果:

Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.6 17G65, locale
    zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    ? Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses
[!] 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 with
      Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ? ios-deploy not installed. To install with Brew:
        brew install ios-deploy
    ! CocoaPods out of date (1.5.0 is recommended).
        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 upgrade:
        brew upgrade cocoapods
        pod setup
[?] Android Studio
    ? Flutter plugin not installed; this adds Flutter specific functionality.
    ? Dart plugin not installed; this adds Dart specific functionality.
[?] Android Studio (version 3.2)
[!] IntelliJ IDEA Ultimate Edition (version 2017.1.6)
    ? Flutter plugin not installed; this adds Flutter specific functionality.
    ? Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
    ! No devices available

! Doctor found issues in 4 categories

三、問(wèn)題解決

從運(yùn)行結(jié)果可以看出有[!]標(biāo)識(shí)的都是有問(wèn)題的選項(xiàng)。
1、更新command-line


圖片.png

2、執(zhí)行以下命令

 $ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

3、查看Android Studio工具,現(xiàn)在已經(jīng)可以找到iPhone模擬器了,使用模擬器已經(jīng)可以正常運(yùn)行
4、安裝homebrew
5、確保homebrew是最新版本

 $ brew update

6、執(zhí)行以下命令

 $ brew install --HEAD usbmuxd

 $ brew link usbmuxd

 $ brew install --HEAD libimobiledevice

 $ brew install ideviceinstaller ios-deploy cocoapods

 $ pod setup

7、打開(kāi)Android Studio設(shè)備切換為真機(jī),運(yùn)行成功

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Content: Flutter框架概況發(fā)展概述發(fā)展歷史框架特性框架結(jié)構(gòu) 快速入門(mén)安裝Flutter在Mac OS...
    EchoZuo閱讀 6,629評(píng)論 3 54
  • 1、通過(guò)CocoaPods安裝項(xiàng)目名稱(chēng)項(xiàng)目信息 AFNetworking網(wǎng)絡(luò)請(qǐng)求組件 FMDB本地?cái)?shù)據(jù)庫(kù)組件 SD...
    陽(yáng)明AI閱讀 16,202評(píng)論 3 119
  • 感恩家人健康,出入平安! 感恩有人租腳手架,讓錢(qián)寶寶流向我的口袋。 感恩有人約楊林看船,讓錢(qián)寶寶流向他的口袋。 感...
    榮漉閱讀 167評(píng)論 0 0
  • 看文須知:1.小萌新還請(qǐng)多多關(guān)照,人物歸作者,ooc我的錯(cuò)。2.冰哥x沈九(渣反)3.私設(shè)頗多請(qǐng)多包涵那么就開(kāi)始吧...
    寒蕭松石閱讀 492評(píng)論 0 2
  • 嘗試以圖片形式發(fā)布讀書(shū)筆記,歡迎交流。 一些值得反思的概念和觀點(diǎn): 利基產(chǎn)品不是為所有人準(zhǔn)備的。 熱門(mén) 大熱門(mén)和流...
    Wantomato閱讀 1,750評(píng)論 3 0

友情鏈接更多精彩內(nèi)容