You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android Studio - Required for building and installing your app on Android #2354
Android Studio - Required for building and installing your app on Android
PS D:\android_workspace\reactstudy> npx react-native doctor
Common
✓ Node.js - Required to execute JavaScript code
✓ yarn - Required to install NPM dependencies
✓ Metro - Required for bundling the JavaScript code
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
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 run npx react native doctor and receive an error message Android Studio - Required for building and installing your app on Android, I have already installed Android Studio, Windows 11 operating system, Java 17 version. How do I handle this issue? Thank you
or maybe its because of wmic, when I've tried to execute it with wmic datafile where name="C:\\Users\va126\\AppData\\Local\\Android\\android-studio\\bin\\studio64.exe" get Version
It gave me this error:
Unexpected switch at this level.
But when I've tried this: wmic datafile where "Name='C:\\Users\\va126\\AppData\\Local\\Android\\android-studio\\bin\\studio64.exe'" get version
It worked just fine and gave me this version:
2022.3.0.0
I've tried my fix, and it worked just fine for me.
All what I've changed is:
constprefix=process.arch==='x64' ? '64' : '';constandroidStudioPath=join(getUserAndroidPath(),'android-studio','bin',`studio${prefix}.exe`).replace(/\\/g,'\\\\');const{stdout}=awaitexecuteCommand(`wmic datafile where "Name='${androidStudioPath}'" get version`,);
In /packages/cli-doctor/src/tools/healthchecks/androidStudio.ts
when i use 'npx react-native doctor' maybe happen this problem? What should I do?My Android Studio is also installed in toolbox, but IDEA doesn't find it either, please help me!!! I don't think it's due to the path of the toolbox installation
you can let it try to download android studio by pressing "f", or you can try to build your project ignoring that error, if everything will compile and run, you can just ignore doctor's message
Activity
thymikee commentedon Apr 7, 2024
It’s likely a bug on our end, nothing to worry about, unless you face issues building for Android from the CLI.
Since we miss Windows contributors, we’d appreciate any help resolving this AS resolution bug
Kailash23 commentedon Apr 11, 2024
Fixed by installing command line tools
And adding this line
export PATH=$PATH:$ANDROID_HOME/cmdline-tools\latest\binin
Close and reopen the terminal
yarn react-native doctormatej-podzemny commentedon Apr 11, 2024
@Kailash23 Why the path has
\? 🤔matej-podzemny commentedon Apr 11, 2024
Same issue here, I have the android studio installed via JetBrain Toolbox and the doctor cannot found it at all, everything else works fine.
I tried to set this, but no luck so far..
GoldenBilly commentedon May 11, 2024
I have the same issue, but app building and running just fine on my android device, so it's only doctor's issue.
GoldenBilly commentedon May 12, 2024
I think issue is here

because in windows (or at least in windows that support 64 bits) android studio's bin is studio64.exe, not studio.exe
GoldenBilly commentedon May 12, 2024
maybe if we replace it with that:
it will be fixed but I'm not sure about that
GoldenBilly commentedon May 12, 2024
or maybe its because of wmic, when I've tried to execute it with
wmic datafile where name="C:\\Users\va126\\AppData\\Local\\Android\\android-studio\\bin\\studio64.exe" get VersionIt gave me this error:
Unexpected switch at this level.
But when I've tried this:
wmic datafile where "Name='C:\\Users\\va126\\AppData\\Local\\Android\\android-studio\\bin\\studio64.exe'" get versionIt worked just fine and gave me this version:
2022.3.0.0
So I think it can be also because of wmic.
GoldenBilly commentedon May 12, 2024
first command is similar to command in code

wy-service commentedon May 13, 2024
Same question
wy-service commentedon May 13, 2024
What should I do
matej-podzemny commentedon May 13, 2024
It is doctor issue, actually in its dependecy envinfo. The issue was raised here, and is already merged: tabrindle/envinfo#252 (review)
SOLUTION: If you still struggle, you can create alias folder to help doctor found it, for mac use this command:
GoldenBilly commentedon May 13, 2024
What about windows?
GoldenBilly commentedon May 15, 2024
I've tried my fix, and it worked just fine for me.
All what I've changed is:
In /packages/cli-doctor/src/tools/healthchecks/androidStudio.ts
GoldenBilly commentedon May 15, 2024
@thymikee
GoldenBilly commentedon May 16, 2024
No one cares...
szymonrybczak commentedon Jun 24, 2024
@matej-podzemny thank you for raising this fix! I've created bump PR inside CLI #2428 🙌
@GoldenBilly this fix makes sense to me! I've a PR with your diff 🙏
GoldenBilly commentedon Jun 26, 2024
you should probably include in your fix also this:
because I dont know why, but at least my windows had a problem with that (I think because of "-" in android studio path)
szymonrybczak commentedon Jun 26, 2024
@GoldenBilly I'm fine with this change, do you mind submitting separate PR? :)
GoldenBilly commentedon Jun 26, 2024
okay, but later, because I dont have PC with me right now
lianzhy commentedon Oct 13, 2024
when i use 'npx react-native doctor' maybe happen this problem? What should I do?My Android Studio is also installed in toolbox, but IDEA doesn't find it either, please help me!!! I don't think it's due to the path of the toolbox installation



GoldenBilly commentedon Oct 15, 2024
it happens because it seems your android studio installed on "D:", not in a user directory, this is why doctor can't find it.
gayatriii0803 commentedon Feb 13, 2025
what is the solution?
GoldenBilly commentedon Feb 13, 2025
you can let it try to download android studio by pressing "f", or you can try to build your project ignoring that error, if everything will compile and run, you can just ignore doctor's message