Issues to run ionic project on Android Studio CAPACITOR_ANDROID_STUDIO_PATH

When I try to run this command:

I recieve the error message bellow:

[capacitor] [error] Unable to launch Android Studio. Is it installed?
[capacitor] Attempted to open Android Studio at: C:\Program Files\Android\Android Studio\bin\studio64.exe
[capacitor] You can configure this with the CAPACITOR_ANDROID_STUDIO_PATH environment variable.


Ionic CLI : 7.1.1 (C:\Users\User\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 6.1.12
@angular-devkit/build-angular : 14.0.4
@angular-devkit/schematics : 13.2.6
@angular/cli : 14.0.4
@ionic/angular-toolkit : 6.1.0


Capacitor CLI : 5.4.0
@capacitor/android : 3.6.0
@capacitor/core : 3.6.0
@capacitor/ios : 3.6.0


cordova-res : not installed globally
native-run : 1.7.2


NodeJS : v16.20.0 (C:\Program Files\nodejs\node.exe)
npm : 8.19.4
OS : Windows 10

I try to set a environment variable, but does’nt work.

So assuming you confirmed that the default path it is looking for (C:\Program Files\Android\Android Studio\bin\studio64.exe) doesn’t exist?

How are you setting the environment variable and to what value?

I made the configuration as shown in the image. I restarted the computer and ran the test again, but it didn’t work :frowning:

Looks right to me. However, that is the same path the CLI is looking for by default so there appears to be a different issue. I would try running the studio64.exe yourself to see if Android Studio opens. You could also try re-installing Android Studio.

I tried running studio64.exe and it worked. I will try to reinstall Android Studio.
Thanks for now.