Basic environment variables have been configured
-
See the website for previous steps
-
Install Android Studio first
-
Run Android Studio once you’ve installed it
-
Install Android SDK 28 using SDK Manager
-
Configure ANDROID_HOME and PATH
Export ANDROID_HOME=/Users/ /Library/Android/ SDK export PATH= PATH:PATH:PATH:{ANDROID_HOME}/tools export PATH= PATH:PATH:PATH:{ANDROID_HOME}/platform-tools
After executing the flutter doctor found that there was still a problem
Flutter requires Android SDK 28 and the Android BuildTools 28.0.3-1 - Android SDK Version 28Copy the code
Second, the reason why
The installed version does not correctly match the version specified by the Flutter
Third, the solution
1. Install Android 9.0 Pie
Android Studio => SDK Manager => SDK Platforms TAB => Android 9.0 PieCopy the code
2. Install Android BuildTools version 28.0.3
Android Studio => SDK Manager => SDK Tools TAB => Select Show Package Details => Select 28.0.3 in Android SDK build-toolsCopy the code
3. Click OK to install
4. After the installation, restart Android Studio.
5. Go to the command line and execute the flutter doctor. This problem should be solved