Fix React native doctor issues (solved)

React native doctor is a diagnostics tool which can help you find if your PC has all the setup for react native development. React native doctor can show certain issues. Let’s see how to solve them

react native doctor diagnostics

React native doctor jdk not found

If you come across this issue that jdk is not found. Then you can quickly install it.

First install chocolatey from the here

Then install jdk using this command:

choco install -y microsoft-openjdk11

ANDROID_HOME not found

In this case, Make sure that you have an environment variable named ANDROID_HOME setup. Here’s a screenshot for reference.

ANDROID_HOME environment variable setup

If you’ve already setup ANDROID_HOME env variable then try the next step

Make sure that you have Android SDK manager. If you dont have it, then Install android command line tools from android studio SDK manager (SDK tools tab). then add <YOUR_ANDROID_SDK_PATH>\cmdline-tools\latest\bin to PATH environment variables

ANDROID_SDK not found

The same solution applies to this as well

Make sure that you have Android SDK manager. If you dont have it, then Install android command line tools from android studio SDK manager (SDK tools tab). then add <YOUR_ANDROID_SDK_PATH>\cmdline-tools\latest\bin to PATH environment variables

Android studio not detected

Same solution applies to this as well

Make sure that you have Android SDK manager. If you dont have it, then Install android command line tools from android studio SDK manager (SDK tools tab). then add <YOUR_ANDROID_SDK_PATH>\cmdline-tools\latest\bin to PATH environment variables

If react native doctor is still not detecting android studio then you’ve probably installed Android studio in a custom path. If this is the case then React native doctor will not detect android studio. It will still keep showing it as an issue whenever you run react-native doctor’s diagnostics.

But that’s okay, you can go ahead and build your React native app and it should build as expected.

Android SDK build tools supported version not found

If the error says something like supported versions 33.0, 31.0 but found 33.2 then you should install the exact build tools version.

You can do this bu opening the SDK manager from Android studio > Select SDK tools tab > Tick “Show package details”. Now you can select the exact build tools version mentioned in the error and click apply. That should solve the unsupported version issue. Here’s a screenshot of the SDK manager’s build tools tab.

SDK manager's build tools tab

Conclusion

These are the solutions to various issues that arise while running react-native diagnostics. Hope it helps ✌🏻

Ranjith kumar
0 0 votes
Article Rating
Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Pranesh
Pranesh
5 months ago

I have added all the necessary points that you have mentioned but I am still getting the issue for Sdk and Android Studio… I have added the path and all the necessary.
I have installed the sdk version as mentioned by the react-native doctor.
Also, i installed the Android Studio recently in the d drive of the system (I think that wouldnt be an issue because I see that in the example sdk is downloaded in E drive)

Abhinay
Abhinay
5 months ago
Reply to  Pranesh

Yeah, it’s not solved for me either. I’ve been at it, trying to fix this for 7 – 8 hours straight now. Do let me know if you found a solution