Reputation: 73
I already have Android Studio installed and tried installing Flutter. After following the instructions, I have encountered a problem. When I run
flutter doctor -v
It returns
[√] Flutter (Channel stable, 1.22.0, on Microsoft Windows [Version 10.0.18363.1082], locale en-PH)
• Flutter version 1.22.0 at C:\src\flutter
• Framework revision d408d302e2 (3 days ago), 2020-09-29 11:49:17 -0700
• Engine revision 5babba6c4d
• Dart version 2.10.0
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\%User%\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.2
X Android SDK file not found:C:\Users\%User%\AppData\Local\Android\sdk\build-tools\30.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.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 50.0.1
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code, 64-bit edition (version 1.48.2)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.14.1
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
I tried connecting my device too and it didn't recognize, even after enabling USB debugging. I also tried reinstalling Android Studio. I think the issue lies with the missing 'aapt' since it's not on any folder when i manually looked for it but Android SDK file not found: C:\Users\%User%\AppData\Local\Android\sdk\build-tools\30.0.2\aapt
tells me it should be there.
Thank you for the help!
Upvotes: 1
Views: 7639
Reputation: 41
I had the same problem today. In my problem, can not find 32 aapt., I had try many:
still not work until:
Upvotes: 1
Reputation: 1
Reinstalling the sdk 30.0.2 from sdk manager in android studio(Tools->sdk tools->(tick show package details)) fixes the problem.
Upvotes: 0
Reputation: 1
I had the same issue Android SDK file not found: C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\31.0.0\aapt.
I had already tried other solutions but this worked for me . In SDK Manager , go to SDK tools , and check the checkbox "Show the various packages" and uncheck "Hide obsolete packages"
Now under Android SDK Build-tools 31 , install 31.0.0 and apply Under Android SDK Command-line tools (latest), install Android SDK Command-line tools (obsolete)
This worked for me , hope it works for you too !
Upvotes: 0
Reputation: 341
I had the same problem today :
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3) X Android SDK file not found: C:\Users\admin\AppData\Local\Android\Sdk\build-tools\30.0.3\aapt.
I fixed it by deleting the two most recent folders in C:\...\build-tools\
which do not contain aapt.exe -> 30.0.2
and 30.0.3
(This deleted folders only contained a folder named .installer
).
This answer inspired me : https://stackoverflow.com/a/56995320/13170425
Upvotes: 2
Reputation: 1115
try this...
open cmd or terminal and run below command
flutter config --android-sdk <path-to-your-android-sdk-path>
hope this will work
Upvotes: 2
Reputation: 108
That's not a big deal. You install the Android SDK and 1 notice that the device is not connected only. You can install the android SDK from the link below:
https://developer.android.com/studio#downloads
Upvotes: 0
Reputation: 436
flutter config --android-sdk
run this command and run flutter doctor again this should help you
Upvotes: 0