参照 Flutter中文网 的教程进行到运行运行 flutter doctor
命令后出现了几个错误
错误1
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
错误2
Android Studio (version 3.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
错误3
Connected device
! No devices available
错误1参照提示,运行flutter doctor --android-licenses
,期间需要几次按"y"确认,
一路"y"下来后提示All SDK package licenses accepted
,问题解决。
再次运行flutter doctor
后发现“错误1”和“错误3”都已经得到了解决。
下面解决“错误2”
在android studio中, 打开plugin,搜索“flutter”,然后点击中间的“Search in repositories”
选择人数最多的这个,然后点击“Install”安装
再次运行flutter doctor
,OK,大功告成!