![](/img/trans.png)
[英]flutter AAPT: error: resource android:attr/lStar not found
[英]Flutter installation error - Android sdk file not found: ....... aapt?
当我在 flutter 中运行 hello world 应用程序时
它显示
Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\hi\AppData\Local\Android\sdk
• Platform android-29, build-tools 29.0.2
X Android SDK file not found: C:\Users\hi\AppData\Local\Android\sdk\build-tools\29.0.2\aapt.
• Try re-installing or updating your Android SDK,
visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.
! Doctor found issues in 1 category.
然后我尝试了 flutter 医生
之后我得到这个..
错误解决:
只需在 sdk 管理器 android 工作室中卸载构建工具 29.0.2 并重新安装构建工具 29.0.2
谢谢你,
我有同样的问题,我删除了导致问题的build-tools/xxx
上的文件夹并再次运行 flutter 应用程序,它可以工作并自动安装所需的构建工具,这是应用程序运行时的 output
Checking the license for package Android SDK Build-Tools 29.0.2 in /home/mde/Android/Sdk/licenses License for package Android SDK Build-Tools 29.0.2 accepted. 准备“安装 Android SDK Build-Tools 29.0.2(修订版:29.0.2)”。 “安装 Android SDK Build-Tools 29.0.2(修订版:29.0.2)”准备就绪。 Installing Android SDK Build-Tools 29.0.2 in /home/mde/Android/Sdk/build-tools/29.0.2 "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" complete. “安装 Android SDK Build-Tools 29.0.2(修订版:29.0.2)”完成。
在“Android SDK 版本 31.0.0-rc4”上面临同样的问题。 试图删除并重新安装build-tools
。 没用。 问题出在 SDK 工具文件夹中。 删除了build-tools
和tools
文件夹。 然后安装Android SDK Command line tools
,以及, Android SDK Platform-tools
对于我的情况,在浪费了一整天之后。 我得到 X Android SDK 文件未找到:C:\Users\user\AppData\Local\Android\sdk\build-tools\.3
所以我复制了 C:\Users\user\AppData\Local\Android\sdk\build-tools\ 路径并将其粘贴到文件夹目录路径中以进行导航。 我删除了名为 31.0.0-rc4 的文件夹并运行
flutter 医生 -v 再次。 希望有人得到帮助
我花了半天时间解决这个问题。 对我来说flutter doctor
显示此错误:
X Android SDK file not found: SomeLongPath/Android/sdk/build-tools/30.0.4-rc1/aapt
我刚刚删除了这个30.0.4-rc1
文件夹,因为它由于某种原因是空的,运行flutter doctor
,问题就解决了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.