Could not locate aapt. Please ensure you have the Android buildtools installed.Exception: Problem building Android application: see above error(s).

Flutter 开发调试一直报错

Could not locate aapt. Please ensure you have the Android buildtools installed.Exception: Problem building Android application: see above error(s).
打包一切都正常,就是Android Studio无法运行安卓模拟器上面。

参考回答资料https://stackoverflow.com/questions/66596943/flutter-app-could-not-locate-aapt-while-building

我的解决办法:

mac和windows系统思路一致,都是删除Adnroid SDK安装目录中,
/用户/xxxx/资源库/Android/sdk/build-tools
中最新的tools(看自己项目当前用的那个)。
删除之后重新更新Android SDK最新的build-tools。
更新完成之后在flutter run进行尝试。
在这里插入图片描述

posted @ 2023-01-27 16:06  天渺工作室  阅读(174)  评论(0编辑  收藏  举报