Error: "Android SDK does not have the proper build-tools."

86 views
Skip to first unread message

budha...@gmail.com

unread,
Jun 25, 2016, 2:11:23 PM6/25/16
to Flutter Dev
I've installed Android Studio and added SDK packages as suggested in https://flutter.io/setup/#get-the-flutter-sdk and https://developer.android.com/studio/intro/update.html .

But when I run
flutter doctor

, I get the following error:

[✓] Flutter (on Linux, channel alpha)
   
Flutter at /home/budhajeewa/Apps/flutter
   
Framework revision 6d2d495369 (3 weeks ago), engine revision a943c732d5


[-] Android toolchain - develop for Android devices
   
Android SDK at /usr/lib/android-sdk
    x
Android SDK does not have the proper build-tools.
   
Try re-installing or updating your Android SDK.


[✓] Atom - a lightweight development environment for Flutter
   
flutter plugin version 0.2.3
   
dartlang plugin version 0.6.28


Any idea why?

Adam Barth

unread,
Jun 25, 2016, 2:15:39 PM6/25/16
to budha...@gmail.com, Flutter Dev
Looks like we print that message when we can't find any SDK versions:

    if (sdkVersions.isEmpty || latestVersion == null)
      return <String>['Android SDK does not have the proper build-tools.'];

What directories do you have in the "platforms" subdirectory of the Android SDK?  For example, on my Mac, here's what I've got:

$ ls ~/Library/Android/sdk/platforms/
android-24

Adam


--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

budha...@gmail.com

unread,
Jun 25, 2016, 2:24:59 PM6/25/16
to Flutter Dev
I remember (On mobile now.) choosing "~/Apps/Android/Sdk" directory when installing Android Studio, so, probably a "platforms" directory inside that is having those platform tools.

Do we have to set that path somewhere?

Adam Barth

unread,
Jun 25, 2016, 3:09:50 PM6/25/16
to budha...@gmail.com, Flutter Dev
On Sat, Jun 25, 2016 at 11:25 AM <budha...@gmail.com> wrote:
I remember (On mobile now.) choosing "~/Apps/Android/Sdk" directory when installing Android Studio, so, probably a "platforms" directory inside that is having those platform tools.

Do we have to set that path somewhere?

We try several of the common paths.  If you have the SDK in an odd location, you can use the ANDROID_HOME environment variable to tell the tool where to find it.

However, in your case, I think the tool is able to find the Android SDK because otherwise it would have given you a different message.  Maybe you have an old copy of the SDK at the usual location that is incomplete?

Adam

budha...@gmail.com

unread,
Jun 25, 2016, 10:38:23 PM6/25/16
to Flutter Dev, budha...@gmail.com
Well, I installed these only today, so I think I should have latest versions.

In my "~/Apps/Android/Sdk/platforms/" directory, there are "android-22" and "android-22" directories.

Adam Barth

unread,
Jun 26, 2016, 12:20:56 AM6/26/16
to budha...@gmail.com, Flutter Dev
What happens if you set ANDROID_HOME to $HOME/Apps/Android/Sdk and then try flutter doctor?

$ export ANDROID_HOME=$HOME/Apps/Android/Sdk
$ flutter doctor

Adam


budha...@gmail.com

unread,
Jun 26, 2016, 12:26:44 AM6/26/16
to Flutter Dev, budha...@gmail.com
Now I feel stupid.

That works!

Googol thanks!

:)

Adam Barth

unread,
Jun 26, 2016, 12:33:44 AM6/26/16
to budha...@gmail.com, Flutter Dev
IMHO, the bug here is that the error message the tool gave you wasn't very informative.  We'll work on improving the message so that folks who encounter the same situation in the future have a better experience.

Thanks!
Adam

budha...@gmail.com

unread,
Jun 26, 2016, 12:35:47 AM6/26/16
to Flutter Dev, budha...@gmail.com
Thank *you*!

Your solution is very good. A FAQ would be helpful too!
Reply all
Reply to author
Forward
0 new messages