Flutter安装错误 - Android sdk file not found: ....... aapt?

San*_*r R 5 installation android flutter

当我在 flutter 中运行 hello world 应用程序时

\n\n

它显示

\n\n
Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.\n
Run Code Online (Sandbox Code Playgroud)\n\n
\n[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)\n    \xe2\x80\xa2 Android SDK at C:\\Users\\hi\\AppData\\Local\\Android\\sdk\n    \xe2\x80\xa2 Platform android-29, build-tools 29.0.2\n    X Android SDK file not found: C:\\Users\\hi\\AppData\\Local\\Android\\sdk\\build-tools\\29.0.2\\aapt.\n    \xe2\x80\xa2 Try re-installing or updating your Android SDK,\n      visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.\n\n! Doctor found issues in 1 category.\n
Run Code Online (Sandbox Code Playgroud)\n\n

然后我尝试了扑动医生

\n\n

之后我得到了这个..

\n

Fut*_*eJJ 14

我花了半天时间解决这个问题。对我来说flutter doctor显示了这个错误:

X Android SDK file not found: SomeLongPath/Android/sdk/build-tools/30.0.4-rc1/aapt
Run Code Online (Sandbox Code Playgroud)

我刚刚删除了这个30.0.4-rc1文件夹,因为由于某种原因它是空的,运行flutter doctor后问题就解决了!


San*_*r R 6

错误已解决:

只需卸载 build-tools 29.0.2 并在 sdk manager android studio 中重新安装 build-tools 29.0.2

谢谢你,