Mac Flutter installation and configuration
Get the Flutter SDK
Dev /docs/develo… (2) Decompress the SDK installation package (3) Configure the environment variable command line: open. bash_profile and then reference the address to the file
Export PATH= 'PATH of your flutter folder' flutter/bin:$PATHCopy the code
Due to network limitations, it is recommended to add a temporary image to Flutter, so the complete code should be
The '/flutter/bin:$PATH' is your clone repository address. The default is to export PUB_HOSTED_URL=https://pub.flutter-io.cn export in your current system path FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn export PATH=/Users/Talon/Desktop/Tools/flutterSdk/flutter/bin:$PATHCopy the code
Second, the installation
Run the following code from the command line to install
flutter doctor
Copy the code
The output was not successful
Doctor summary (to see all details, run flutter doctor -v): ✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.11.615G31, locale zh-Hans) [!] Develop Toolchain for Android Devices (Android SDK Version 28.0.3)! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [!] Xcode - Develop for iOS and macOS (Xcode 8.2.1) Eligible Flutter requires a minimum Xcode version of 9.0.0. Download the latest version or update via the Mac App Store. ! CocoaPods out of date (1.6.0 is recommended). 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 upgrade: Brew Upgrade Cocoapods Pod Setup [onto those who qualify] iOS Tools - Develop for iOS devices qualify 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 can qualify ios-deploy not installed. To install: brew install ios-deploy [!] Android Studio (Version 3.2) Qualify Flutter plugin not installed; Those who qualify Dart plugin not installed; This adds Flutter specific functionality. this adds Dart specific functionality. [!] IntelliJ IDEA Community Edition (Version 2018.2.4) Eligible Flutter plugin not installed; Those who qualify Dart plugin not installed; This adds Flutter specific functionality. this adds Dart specific functionality. [!] Connected device ! No devices available ! Doctor found issues in 6 categories.Copy the code
The above information can be seen
- Version of Flutter installation
- Some licenses were not accepted for the Android toolchain required for Flutter to run
- XCode needs to be updated, IOS skips first
- The AS and IntelliJ plug-ins are not installed
- No device link
Resolution: (1) Accept the license
flutter doctor --android-licenses
Copy the code
Input Y all the way
(2) Install the AS plug-in and restart the AS
Then check File>Settings>Plugs>Android APK Support to confirm and restart the AS
The first FLUTTER program
- Select File>New Flutter Project
- Once created, start it.