-
Notifications
You must be signed in to change notification settings - Fork 1k
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
bug: CAPACITOR_ANDROID_STUDIO_PATH does not work with JetBrains toolbox managed shell scripts. #5250
Comments
Same problem here with Mac M1. I have to open Android studio manually. |
You can put this in your androidStudioToolboxBase="${HOME}/Library/Application\ Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0"
androidStudioToolboxVersion=$(ls ${androidStudioToolboxBase})
export CAPACITOR_ANDROID_STUDIO_PATH=${androidStudioToolboxBase}/${androidStudioToolboxVersion}/Android\ Studio.app/ It would be better if that location is checked as well by default on Apple hardware. |
I use MacOS and I had to remove quotes from the first line for it to work. Thanks for sharing! |
Different form of "not work" - I get Finder windows? I've got my JetBrains products installed via Toolbox. If I manually open Studio and then open the project's I can't easily set the So, I set up Toolbox to generate scripts and set the env var in my
Now, from a terminal command line I can simply execute I'm a Mac-newbie (M1 Mac Mini, macOS Monterey 12.4), so maybe I'm missing something obvious ... If I manually open Studio and then open the project's android directory my project runs. |
If you go to the toolbox app and look into the settings, you find an option "Generate shell scripts", you can define a path or use the default path. The toolbox app will generate a binary to open android studio there, then simply use the path to the studio binary as CAPACITOR_ANDROID_STUDIO_PATH. I've been doing this on linux and mac. |
Thank you. But it seems |
I have this issue too |
@gabrielmaldi try to set the CAPACITOR_ANDROID_STUDIO_PATH variable to the full path to the binary, this should work |
In Windows it wont start... ERROR: The system was unable to find the specified registry key or value.
App • ⚠️ Cannot determine path to IDE executable
Please set quasar.config.js > bin > windowsAndroidStudio with the escaped path to your studio64.exe
Example: 'C:\\Program Files\\Android\\Android Studio\\bin\\studio64.exe'
|
Jetbrains Toolbox now seems to helpfully place files here on macOS:
So there's no need to mess with identifying the version and such anymore. If it's as simple as running this script, I definitely think that capacitor should automatically check this path as well. |
I'm using this in
Working on Mac M2! |
Hi first use belog command
then copy path for me then paste below command in .zshrc file
then source .zshrc and finish :) |
I works!! |
It works!! |
I just recently moved my development environment from Windows to macOS, and found myself running into this same issue... I have JetBrains Toolbox installed and running with all default options, nothing fancy there. checking the Android Studio settings inside Toolbox, I see the following: ..so I added the following line to my export CAPACITOR_ANDROID_STUDIO_PATH="$HOME/Applications/Android Studio.app" ..and now with that said, I feel like this would be resolved by simply making this |
closing since there has been several workarounds about how to get the Android Studio path to configure the |
Bug Report
Capacitor Version
Platform(s)
MacOs
Current Behavior
JetBrains ToolBox has integrated shell scripts that point to the latest Android studio version installed. (see here). This is done because each release incorporates the build ID on the path, so a hard coded path will always break after a version update.
Setting the path of the generated
studio.sh
script intoCAPACITOR_ANDROID_STUDIO_PATH
fails with:Expected Behavior
We could be able to give this script to open capacitor projects.
Code Reproduction
--
Other Technical Details
The generated script looks like this:
The text was updated successfully, but these errors were encountered: