我试图在Arch上为CapacitorJS设置我的开发环境。我跟踪了文档并补充说
CAPACITOR_ANDROID_STUDIO_PATH=/usr/bin/android-studio
对于我的系统环境变量(不是项目),但是我仍然得到相同的错误
[error] Unable to launch Android Studio. Is it installed?
Attempted to open Android Studio at:
/usr/local/android-studio/bin/studio.sh
You can configure this with the CAPACITOR_ANDROID_STUDIO_PATH
environment variable.
即使是,从来没有指出过/usr/local/android-studio/bin/studio.sh
我运行了whereis android-studio
,得到了android-studio: /usr/bin/android-studio
,所以我认为这是正确的路径,但是每次运行npx cap open android
时,它都说它正在尝试从相同的路径启动,并且不会改变
发布于 2021-10-05 21:44:34
这取决于您如何安装它,例如,Toolbox将它安装在用户的主目录中。
nano ~/.bashrc
export CAPACITOR_ANDROID_STUDIO_PATH=~/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908/bin/studio.sh
locate studio.sh
也许也能找到它。
https://stackoverflow.com/questions/69456525
复制相似问题