skip to Main Content

Unable to Build my react-native app due to Android SDk not found even i have installed all the require Sdks and other build tools and also set Envirmental Variables.

npx react-native doctor

`⠋ Running diagnostics...* daemon not running; starting now at tcp:5037

* daemon started successfully
  Common
  ✓ Node.js - Required to execute JavaScript code
  ✓ npm - Required to install NPM dependencies

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 SDK - Required for building and installing your app on Android

- Versions found: N/A
- Version supported: 33.0.0
  ✓ ANDROID_HOME - Environment variable that points to your Android SDK installation

Errors:   1
Warnings: 0

Usage
› Press f to try to fix issues.
› Press e to try to fix errors.
› Press w to try to fix warnings.
› Press Enter to exit.`

When i press f to fix the issues it download the cmdline tools and give me the log

⚠ Android SDK configured but virtualization could not be enabled.

Virtualization is enabled

npx react-native info

`info Fetching system and libraries information... System:   OS: Windows 10 10.0.19044   CPU: (4) ia32 Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz   Memory: 5.05 GB / 7.91 GB Binaries:   Node:     version: 18.15.0     path: C:Program Files (x86)nodejsnode.EXE   Yarn: Not Found   npm:     version: 9.5.0     path: C:Program Files (x86)nodejsnpm.CMD   Watchman: Not Found SDKs:   Android SDK: Not Found   Windows SDK: Not Found IDEs:   Android Studio: AI-223.8836.35.2231.10406996   Visual Studio: Not Found Languages:   Java: 17.0.7   Ruby: Not Found npmPackages:   "@react-native-community/cli": Not Found   react:     installed: 18.2.0     wanted: 18.2.0   react-native:     installed: 0.72.4     wanted: 0.72.4   react-native-windows: Not Found npmGlobalPackages:   "*react-native*": Not Found Android:   hermesEnabled: true   newArchEnabled: false iOS:   hermesEnabled: Not found   newArchEnabled: Not found`

Environmental Variables

VAriables
Paths

Android SDK and other tools

i have reinstall the cmdline tools and sdk 33.0.0 but the issue is same .

2

Answers


  1. Chosen as BEST ANSWER

    There was issue in JAVA_HOME variable .Now everything working fine.


  2. In your android directory you must have a local.properties file that points to the location of your android sdk. In this file all you need is a single line: sdk.dir=/Users/<user>/Library/Android/sdk. Note that is might not be the location of your sdk.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search