cli: React Native Doctor is unable to detect the Android SDK in Windows 10

Hello I tried to exec the npx react-native doctor and obtain that: image

I have installed the android-sk 33 and 34, but supported .b33.0.0. I need help please!!

The npx react-native info get that: image image

And I installed the latest version (11) from Android SDK Command-line Tools

React native project to test: https://github.com/bogdanbaghiu/test_image_colors

But the check of Android Sdk not pass 😩

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 26

Most upvoted comments

@szymonrybczak Thanks for your answer! You were right that I had the added library in my package.json and after that I have made several changes to my package.json that I invite you to look at and try. I have made some progress but I will tell you what I have been discovering.

I Delete the node_modules, android folder and package-lock. I did an install npx expo install react-native-image-colors library, I already had it installed but I did it so that the yarn.lock file updates all the dependencies. Then I did an npm install that installed all the dependencies in my project. Next I launched the npx expo run:android command and it created an android build again. It launched successfully on my device. Finally I told myself that I am going to check if the npx react-native doctor command has solved my problem and apparently it still looked the same.

Then I realized that if I delete the android folder from my project I get the following: image

I have noticed that the npx expo run:android command generates the android build but for some reason it says that the Android SDK supported has to be .b33.0.0 and the ones I have installed are 33.0.0

Could you check if the same thing happens to you with my project but on your computer? If it doesn’t happen to you, could you please try to guide me to know why it tells me that it needs an sdk with .b in front of 33.0.0?

Hi @bogdanbaghiu, did you ever figure out why you are seeing the .b in front of the version number? I’m using Expo, and upon running npx react-native doctor I also see that the version supported has a .b prefixed in front of the version number, but I don’t know what it’s meant to mean.

Mesmo problema aqui no macOS Sonoma 14.5

Update: Consegui resolver dessa forma:

buildscript {
    ext {
        // buildToolsVersion = findProperty('android.buildToolsVersion') ?: '34.0.0' (estava assim, e lia como .b34.0.0)
        buildToolsVersion = '34.0.0' (deixei dessa forma e funcionou)
           }
}

Provavelmente nĂŁo Ă© a maneira mais adequada. Mas foi a Ășnica forma que consegui resolver essa issue.

If you have any issues like version supported .b34.0.0

Make sure you have Android NDK of 27.0.11902837 and also set that in your project; Like below:

buildscript { ext { 
 kotlinVersion = findProperty(‘android.kotlinVersion’) ?: ‘1.9.23’

    ndkVersion = "27.0.11902837"
}
...

}

hey all! if you’re using expo inside your project e.g. Expo is generating android/ folder, you shouldn’t use npx react-native doctor to check environment of your project, then you should use Expo tools to check project-related conditions.

If the issue is presented and you’re using project bootstrapped with React Native Community CLI and not levering Expo tools please feel free to open new issue.

Looks like this code is looking for a digit or a . This has problems when build.gradle has content like this

buildscript {
    ext {
        buildToolsVersion = findProperty('android.buildToolsVersion') ?: '33.0.0'
    }
}

Running npx expo-doctor and fixing some of the warnings seems to have helped, for me 😃

Same issue for me too!!!

if anybody knows how to fix this please help me

Android ✓ Adb - Required to verify if the android device is attached correctly ✓ JDK - Required to compile Java code ✓ Android Studio - Required for building and installing your app on Android ✓ ANDROID_HOME - Environment variable that points to your Android SDK installation ✓ Gradlew - Build tool required for Android builds ✖ Android SDK - Required for building and installing your app on Android

  • Versions found: 34.0.0
  • Version supported: .b34.0.0

Environment:

System: OS: Windows 10 10.0.19043 CPU: (8) x64 Intel¼ Coreℱ i5-10210U CPU @ 1.60GHz Memory: 2.97 GB / 7.88 GB Binaries: Node: version: 20.12.2 path: C:\Program Files\nodejs\node.EXE Yarn: Not Found npm: version: 10.5.2 path: C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: - “34” Build Tools: - 34.0.0 Android NDK: Not Found Windows SDK: AllowAllTrustedApps: Disabled Versions: - 10.0.16299.0 IDEs: Android Studio: AI-233.14808.21.2331.11709847 Visual Studio: - 16.10.31424.327 (Visual Studio Community 2019) Languages: Java: 17.0.11 Ruby: Not Found npmPackages: “@react-native-community/cli”: Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.74.2 wanted: 0.74.2 react-native-windows: Not Found npmGlobalPackages: “react-native”: Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: Not found newArchEnabled: Not found

ign) $ npx react-native info info Fetching system and libraries information
 System: OS: Windows 11 10.0.22631 CPU: (8) x64 Intel¼ Coreℱ i7-8650U CPU @ 1.90GHz Memory: 8.00 GB / 15.85 GB Binaries: Node: version: 20.10.0 path: C:\Program Files\nodejs\node.EXE Yarn: version: 1.22.19 path: ~\AppData\Roaming\npm\yarn.CMD npm: version: 10.4.0 path: C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: - “31” - “33” - “34” Build Tools: - 30.0.3 - 31.0.0 - 34.0.0 System Images: - android-30 | Google Play Intel x86 Atom - android-34 | Intel x86_64 Atom - android-34 | Google APIs Intel x86_64 Atom Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-232.10300.40.2321.11668458 Visual Studio: Not Found Languages: Java: javac 20 Ruby: Not Found npmPackages: “@react-native-community/cli”: Not Found react: installed: 18.1.0 wanted: 18.1.0 react-native: installed: 0.74.1 wanted: ^0.74.1 react-native-windows: Not Found npmGlobalPackages: “react-native”: Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: Not found newArchEnabled: Not found

I’m having the same issue on Apple Silicon and I am NOT using expo. SDK is there but same doctor results
 Thoughts?

`npx react-native info

WARNING: You should run npx react-native@latest to ensure you’re always using the most current version of the CLI. NPX has cached version (0.73.1) != current release (0.73.3)

info Fetching system and libraries information
 System: OS: macOS 14.3 CPU: (10) arm64 Apple M1 Pro Memory: 2.34 GB / 16.00 GB Shell: version: “5.9” path: /bin/zsh Binaries: Node: version: 19.4.0 path: ~/.nvm/versions/node/v19.4.0/bin/node Yarn: version: 1.22.19 path: /opt/homebrew/bin/yarn npm: version: 9.2.0 path: ~/.nvm/versions/node/v19.4.0/bin/npm Watchman: version: 2023.06.12.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /Users/km2t7x72tn/.rbenv/shims/pod SDKs: iOS SDK: Platforms: - DriverKit 23.2 - iOS 17.2 - macOS 14.2 - tvOS 17.2 - visionOS 1.0 - watchOS 10.2 Android SDK: Not Found IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9619390 Xcode: version: 15.2/15C500b path: /usr/bin/xcodebuild Languages: Java: version: 21.0.1 path: /usr/bin/javac Ruby: version: 2.7.6 path: /Users/km2t7x72tn/.rbenv/shims/ruby npmPackages: “@react-native-community/cli”: Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.1 wanted: 0.73.1 react-native-macos: Not Found npmGlobalPackages: “react-native”: Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false

info React Native v0.73.3 is now available (your project is running on v0.73.1). `