我已经从 android-studio-ide-202.7351085-linux.tar.gz
下载了 android-studio develop.android.com
文件,并将该文件解压缩到 /opt/android-studio
文件夹,以便将 android studio 软件安装在 root
目录中。我不想将它安装在 /home/Downloads
目录中。但我的应用栏和搜索栏上没有显示任何软件图标。我想知道为什么,我还想为从任何目录运行/启动 android studio 设置路径环境变量。
正如它在 install_linux.tar
中提到的,指令是 3
和 4
。
3. [OPTIONAL] Add "{installation home}/bin" to your PATH environment variable so that you can start Android Studio from any directory.
4. [OPTIONAL] To adjust the value of the JVM heap size, create a file studio.vmoptions (or studio64.vmoptions if using a 64-bit JDK) in the configuration directory and set the -Xms and -Xmx parameters. To see how to do this, you can reference the vmoptions file under "{installation home}/bin" as a model but do not modify it, add your options to the new file.
我安装 android-studio 的目的是为了学习 Flutter 中的应用程序开发。
简短答案:
1.转到您的主目录。
2.键入
ls -a
3.您应该看到名为
.bashrc
(perhaps you will see file named
的文件。zshrcinsead - then replace
。bashrcwith
。zshrc)
4.键入
nano .bashrc
5.将此行添加到文件末尾:
export PATH=/path/to/your/instalation/directory/android-studio/bin:$PATH
6.按CTRL+S,然后按Ctrl+X
7.用
source ~/.bashrc
重新加载长答案:
我遇到了同样的问题,我发现了这个网站 https://linuxhint.com/add-directory-to-path-linux/ ,在哪里向细节解释了所有内容。我建议阅读。