defold icon indicating copy to clipboard operation
defold copied to clipboard

External IDE - Android Studio does not work

Open zendorx opened this issue 1 year ago • 5 comments

screenshot

If set android studio path on mac os Defold Editor wont open this path. I think it is because of space in "Android Studio" name. I have tested it with PyCharm and it works ok

Steps to reproduce the behavior:

  1. Install Android Studio
  2. Set path for external editor "/Applications/Android Studio.app/Contents/MacOS/studio"
  3. Try to open script file
  4. Nothing happens
  5. Install PyCharm
  6. Set path for external editor "/Applications/PyCharm CE.app/Contents/MacOS/pycharm"
  7. Try to open script file
  8. Everything works fine

Defold version (REQUIRED):

  • Version 1.8.0

MAC OS

zendorx avatar May 26 '24 06:05 zendorx

Can you open individual files like that or does it have to be an Android Studio Project? Have a look at some of the answers here: https://stackoverflow.com/questions/35363546/open-androidstudio-project-from-command-line-on-osx

britzl avatar May 26 '24 06:05 britzl

I open file like that from terminal /Applications/Android\ Studio.app/Contents/MacOS/studio . --line 100 "/Users/ds/rpg/defold/rpg/im/debug_utils.lua"

zendorx avatar May 26 '24 11:05 zendorx

It turns out that /Applications/Android\ Studio.app/Contents/MacOS/studio is a Java class file, not an executable. It loads with the help of the Info.plist where classpath and other details are specified. I'm not sure how we can do the same from the Defold editor.

britzl avatar May 27 '24 11:05 britzl

I was thinking that perhaps there needs to be an xdg-open, open or start based invocation but based on this stack overflow answer, it might be simply overcome by letting the ide create the appropriate command line binding and use that from defold?

bjconlan avatar Aug 07 '24 01:08 bjconlan

it might be simply overcome by letting the ide create the appropriate command line binding and use that from defold?

Yes, perhaps that is sufficient. On macOS I get this suggestion when selecting "Configure Command-Line Launcher":

Screenshot 2024-08-07 at 08 04 06

You could try adding the suggested path to your system path and see if that's enough.

britzl avatar Aug 07 '24 06:08 britzl