Proposing to add tips to `doctor`
For me react-native doctor was showing that "Android Studio not found" and "Android SDK" is not found.
And I even could not google anything how it tries to find it.
So I went to source code, find that cli use envinfo package for this, went to envinfo source and discovered that android studio must be in /opt/android-studio/bin/studio.sh and SDK info must come from sdkmanager terminal utility which was not working.
To solve it:
- make symbolic link from studio.sh that you have to /opt/android-studio/bin/studio.sh
- sdkmanager requires JDK 8, and I had 14, install it and then put
JAVA_HOME="/usr/lib/jvm/java-8-openjdk"to your .zshrc or .bashrc (update path to yours jdk)
Please add some help to doctor
I used doctor because react-native run-android just silently hangs, and this is not good
cc @lucasbento
@romeerez: thanks for proposing this, the more I think about it the more I like it.
I'll try to get a small experience ready for this so we can evaluate it, I was thinking about that the CLI can, perhaps, show a few bullet points explaining how it tried to find the SDK or whatever other software, something like:
- Android
○ SDK ❌
- Found `ANDROID_HOME` path at `/path/to/android`;
- Found SDK path at `/path/to/sdk`;
- Important file (`random_file.sh`) not found.
This can, of course, get pretty extensive so I would recommend hiding it under a flag, something like --tips.
Thoughts?
I don't think that it may get extensive, there is a small amount of such checks, but it would be helpful for sure. If it's unwanted to get verbose doctor report, at least would be nice to have a tip how to get tips
There are quite a few checks inside of envinfo that would be nice to have covered.
If doctor outputs an error we can show a message that using the --tips flag can be useful.
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.