為您解碼網(wǎng)站建設(shè)的點(diǎn)點(diǎn)滴滴
發(fā)表日期:2018-12 文章編輯:小燈 瀏覽次數(shù):2451
export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn git clone -b beta https://github.com/flutter/flutter.git export PATH="$PWD/flutter/bin:$PATH" cd ./flutter 執(zhí)行
flutter doctor 檢測(cè)flutter環(huán)境
[?] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14 18A391, locale zh-Hans-CN) [?] 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.io/setup/#android-setup for detailed instructions). If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location. You may also want to add it to your PATH environment variable.[!] iOS toolchain - develop for iOS devices (Xcode 10.1) ? 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 ? Brew can be used to install tools for iOS device development. Download brew at https://brew.sh/. [!] Android Studio (not installed) [!] VS Code (version 1.29.1) [?] Connected device (1 available) 以上結(jié)果代表flutter環(huán)境已安裝好,但是andriod跟ios的工具沒(méi)安裝好,根據(jù)提示安裝就可。如何沒(méi)有安裝homebrew,使用以下命令安裝即可
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 進(jìn)入vs code執(zhí)行Cmd+Shift+P選擇Flutter: new project,輸入項(xiàng)目名稱