flipper: Flipper Doctor complains Android SDK is not installed

šŸ› Bug Report

I’ve been using Flipper since before the name change and it’s always worked fine (still does).

However, on each launch, I get an error banner claiming there are problems with my install.

Flipper

My Android SDK is configured correctly, and complete.

Flipper

android-sdk

To Reproduce

Launch Flipper, or start Doctor.

Expected Behavior

Doctor should not claim there is an error with my setup. Of if there really are, it should describe the issue in a way that makes it actionable.

Environment

  • MacOS High Sierra 10.13.6
  • Flipper 0.29.4
adb --version
Android Debug Bridge version 1.0.41
Version 29.0.5-5949299
Installed as /Applications/Dev/android-sdk/platform-tools/adb

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 33 (17 by maintainers)

Most upvoted comments

I fixed the error by going to my local.properties file in VS Code coping the sdk.dir which mine is /Users/[MYUSER]/Library/Android/sdk then I went in Filpper -> File -> Preferences and changed the Android SDK Location See image… Flipper

Then I clicked the Apply and Restart Button

in your terminal type echo $ANDROID_HOME that will give you the path to the Android SDK.

Copy that path and paste it in Flipper -> File -> Preferences -> Android SDK Location.

image

Apply and restart and you should be done.

@nikoant I’m facing the same issue, flipper is weirdly saying that android_home is /opt/android_sdk and doesn’t exit … which it is not true at all Screen Shot 2020-04-08 at 00 06 51

everything regarding android is working fine for me, I’m not sure what the issue is here, could u please let me know what u think of this ?

thanks.

I have this issue as well despite correct env info and my JAVA_HOME set to jdk 8

Env info is

Android SDK:
      API Levels: 25, 28, 29
      Build Tools: 25.0.2, 28.0.3, 29.0.0, 29.0.2
      System Images: android-29 | Google APIs Intel x86 Atom
      Android NDK: 21.0.5935234

It would be tremendously helpful if the doctor displayed some explanation as to why it believes it’s failed. The current screen gives no actionable information to the developer.

image

Thank you for pointing me in the right direction! As you surmised, the tool didn’t detect my Android SDK in with either command.

After looking at the source for envinfo, I realized the root cause was this issue.

The short-term fix for me is downgrading the version of Java I use by default, until Google finally updates their build tools for a current version of Java.

In your terminal, run echo $ANDROID_HOME, copy the path over to Flipper settings

On Mac OS I put ~/Library/Android/sdk into flippers settings first, turns out, flipper wants an absolute path like /Users/<username>/Library/Android/sdk

in your terminal type echo $ANDROID_HOME that will give you the path to the Android SDK.

Copy that path and paste it in Flipper -> File -> Preferences -> Android SDK Location.

image

Apply and restart and you should be done.

For new Flipper (Mac version). Its under cog icon > settings

I fixed the error by going to my local.properties file in VS Code coping the sdk.dir which mine is /Users/[MYUSER]/Library/Android/sdk then I went in Filpper -> File -> Preferences and changed the Android SDK Location See image… Flipper

Then I clicked the Apply and Restart Button

This solution works for me. Thanks!

@a-eid on Mac, console apps and gui apps do not necessarily share the same environment. Try exporting your console env:

launchctl setenv JAVA_HOME $JAVA_HOME

Ok I’m not sure I understand. The README says it requires yarn 1.5+, yet that doesn’t exist according to yarn’s website

image

This remains broken in 0.30.2

Interesting, thanks for reporting.

What do you get if you run this from the command line? npx envinfo

and also this: ANDROID_HOME=/Applications/Dev/android-sdk npx envinfo