When i run a hello world application in flutter
it show
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.
then i tried flutter doctor
after that i get this..
Error solved:
just uninstalling build-tools 29.0.2 and reinstalling build-tools 29.0.2 in sdk manager android studio
thank you,
I have the same problem, i delete the folder on build-tools/xxx
that cause the problem and run the flutter app again, it works and it install automatically the build tools needed, this the output of the app when it run
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. Preparing "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)". "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" ready. 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. "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" finished.
Faced the same issue, on 'Android SDK version 31.0.0-rc4'. Tried to remove and reinstall build-tools
. Didn't work. The problem was in the SDK tools folder. Removed both build-tools
and tools
folder. And then Installed Android SDK Command line tools
, as well as, Android SDK Platform-tools
again
For my case and after wasting a full day. I was getting X Android SDK file not found: C:\Users\user\AppData\Local\Android\sdk\build-tools\31.0.0-rc4\aapt.
So i copied C:\Users\user\AppData\Local\Android\sdk\build-tools\ path and pasted it in a folder directory path to navigate. i deleted folder named 31.0.0-rc4 and run
flutter doctor -v again. hope someone gets helped
I spent like half a day solving this issue. For me flutter doctor
displayed this error:
X Android SDK file not found: SomeLongPath/Android/sdk/build-tools/30.0.4-rc1/aapt
I just deleted this 30.0.4-rc1
folder because it was empty for some reason, ran flutter doctor
and the issue is solved!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.