Skip to content

[fix] Support Android Studio path that JetBrains Toolbox installs to on Windows#2682

Merged
thymikee merged 7 commits intoreact-native-community:mainfrom
matthargett:windows-android-studio-path
Sep 15, 2025
Merged

[fix] Support Android Studio path that JetBrains Toolbox installs to on Windows#2682
thymikee merged 7 commits intoreact-native-community:mainfrom
matthargett:windows-android-studio-path

Conversation

@matthargett
Copy link
Copy Markdown
Contributor

Summary

The default experience on Windows has a few issues, and this one is an easy fix. Jetbrains Toolbox and the default Android Studio user installer install into a path that the doctor command doesn't look in. This causes doctor to install yet another Android Studio unnecessarily.

Test Plan

CLI now detects the Android Studio installation on my Windows 11 machine.
Added a unit test to show the fallback path is working.

Checklist

  • [x ] Documentation is up to date.
  • [x ] Follows commit message convention described in CONTRIBUTING.md.
  • For functional changes, my test plan has linked these CLI changes into a local react-native checkout (instructions).

…ath than the one detected by doctor. Support this alternate path for folks who aren't using nuget to install Android Studio.
Copy link
Copy Markdown
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Matt!

environmentInfo.IDEs['Android Studio'] = 'Not Found';
// Force the platform to win32 for the test
const platformSpy = jest
.spyOn(process, 'platform', 'get')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests are failing here, can you investigate that?

…, so inject a writable propery for the test. there is a slightly nicer way to do this in jest 29+ with 'replaceProperty', I added some TODO comments as a reminder when someone upgrades jest later.
@thymikee thymikee merged commit ff27413 into react-native-community:main Sep 15, 2025
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants