安裝flutter
1.安裝android studio 扫外,打開配置plugin 下載安裝flutter
2.a(chǎn)ndroid sdk瓢喉,打卡sdk文件夾下tools/android,下載所需sdk版本腰涧,
配置環(huán)境變量
?????? exportANDROID_HOME=/Users/cody/App/android-sdk-macosx
????????export PATH=${PATH}:${ANDROID_HOME}/platform-tools
????????export PATH=${PATH}:${ANDROID_HOME}/tools
????????export PATH=${PATH}:${ANDROID_HOME}/build-tools/28.0.3
【1】臣镣、Android toolchain - develop for Android devices (Android SDK version28.0.3)
????????????! Some Android licenses not accepted. To resolve this, run: flutterdoctor
????????–android-licenses
????????本機已安裝了AndroidSDK,Android許可不被接受,需要執(zhí)行以下命令竿报,同意許可
??????????flutter doctor --android-licenses
? ? ? ? ????????如果報錯Error: Unknown argument --licenses,
????????????????執(zhí)行(確認java版本為java8/jdk1.8)
????????????????????? /Users/yangshanshan/Documents/download-program/android-sdk-macosx/tools/bin/sdkmanager --update
? ??????
【2】继谚、Xcode - develop for iOS and macOS
?????????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
????????本機已安裝了xcode烈菌,那就是需要執(zhí)行以下命令
????????cmd
????????sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
????????sudo xcodebuild -license
【3】、Android Studio (version 3.4)
?????????Flutter plugin not installed; thisadds Flutter specific functionality.
?????????Dart plugin not installed; thisadds Dart specific functionality.
????????本機已安裝Android Studio花履,但是缺這兩個插件芽世,需要我們去安裝一下。
????????打開Android Studio->configure->Plugins
????????搜索flutter 進行install