-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Studio - Required for building and installing your app on Android #2354
Comments
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 Why the path has |
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..
|
I have the same issue, but app building and running just fine on my android device, so it's only doctor's issue. |
maybe if we replace it with that: const prefix = process.arch === 'x64' ? '64' : '';
const androidStudioPath = join(
getUserAndroidPath(),
'android-studio',
'bin',
`studio${prefix}.exe`
) it will be fixed but I'm not sure about that |
or maybe its because of wmic, when I've tried to execute it with But when I've tried this: So I think it can be also because of wmic. |
Same question |
What should I do |
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:
|
What about windows? |
No one cares... |
@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 🙏 |
you should probably include in your fix also this: const {stdout} = await executeCommand(
`wmic datafile where "Name='${androidStudioPath}'" get version`,
); because I dont know why, but at least my windows had a problem with that (I think because of "-" in android studio path) |
@GoldenBilly I'm fine with this change, do you mind submitting separate PR? :) |
okay, but later, because I dont have PC with me right now |
it happens because it seems your android studio installed on "D:", not in a user directory, this is why doctor can't find it. |
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
The text was updated successfully, but these errors were encountered: