简体   繁体   English

我无法在Android Studio 1.3中编辑studio.exe文件

[英]I can't edit studio.exe file in Android Studio 1.3

I'm running Android Studio 1.3 (I think it was the latest version) in a 4GB RAM pc, I've searched about how to make Android Studio take less memory so that I can run it better in my low spec pc, so far I've found the following questions: 我正在4GB RAM的PC上运行Android Studio 1.3(我认为它是最新版本),我一直在寻找如何使Android Studio占用更少的内存,以便到目前为止可以在低规格的PC上更好地运行它。我发现了以下问题:

In those question people suggested to low the memory value in the Xmx attribute from 750m to 256m in the studio.exe vmoptions file the folder /Applications/Android\\ Studio.app/Contents/bin/studio.vmoptions I looked in the offcial documentation here: https://sites.google.com/a/android.com/tools/tech-docs/configuration and there it says that is not recomended to edit those files, they advice to create a custom file, but I don't know how to do this. 在这些问题中,人们建议将Studio.exe vmoptions文件文件夹/Applications/Android\\ Studio.app/Contents/bin/studio.vmoptions中的Xmx属性中的内存值从750m256m ,我在此处查看了官方文档: https : //sites.google.com/a/android.com/tools/tech-docs/configuration ,那里说不建议您编辑这些文件,他们建议创建自定义文件,但我不建议这样做知道该怎么做。

Questions: 问题:

1) Should I create a whatever.exe vmoptions file in that folder with the change? 1)我是否应该在更改后的文件夹中创建一个what.exe vmoptions文件? and what should I do with the original file? 我应该怎么处理原始文件? and how android studio would know to read from my custom file instead of the original file. 以及android studio如何知道从我的自定义文件(而不是原始文件)中读取。

2) In the official documentation says that edit that file but it says that that file is in this path %USERPROFILE%\\.{FOLDER_NAME}\\studio.exe.vmoptions and/or %USERPROFILE%\\.{FOLDER_NAME}\\studio64.exe.vmoptions but I can't find the file in that path, instead I founded in this path /Applications/Android\\ Studio.app/Contents/bin/studio.vmoptions . 2)在官方文档中说要编辑该文件,但%USERPROFILE%\\.{FOLDER_NAME}\\studio.exe.vmoptions and/or %USERPROFILE%\\.{FOLDER_NAME}\\studio64.exe.vmoptions该文件位于此路径%USERPROFILE%\\.{FOLDER_NAME}\\studio.exe.vmoptions and/or %USERPROFILE%\\.{FOLDER_NAME}\\studio64.exe.vmoptions但在该路径中找不到文件,而是在/Applications/Android\\ Studio.app/Contents/bin/studio.vmoptions路径中创建了文件。

What I did before asking: 在问之前我做了什么:

Before asking i tried to edit this file /Applications/Android\\ Studio.app/Contents/bin/studio.vmoptions but it says that this file is already opened by another program or that it can't be saved. 在询问之前,我尝试编辑此文件/Applications/Android\\ Studio.app/Contents/bin/studio.vmoptions但它表示此文件已由其他程序打开,或者无法保存。

I did this with android studio closed and I pretty sure that this file it's not opened by another program. 我是在android studio关闭的情况下完成此操作的,我很确定此文件不会被其他程序打开。

It might be a little late but i recently faced these issues. 可能有点晚了,但我最近遇到了这些问题。 So here's what you can do 1. No need to create a new file. 因此,您可以执行以下操作:1.无需创建新文件。 Just edit studio.exe.vmoptions. 只需编辑studio.exe.vmoptions。 2. Path is OK ie the bin folder. 2.路径确定,即bin文件夹。

As far as edit goes its a screw up from the editor. 就编辑而言,它与编辑器之间的关系不一。 The real problem is that you may not have permission on the parent folder(bin). 真正的问题是您可能没有父文件夹(bin)的权限。 Just change the permissions for your user or all users for that matter if its not a problem. 如果这不是问题,只需更改您的用户或所有用户的权限即可。 Run the -R command to do this recursively.then try and edit. 运行-R命令以递归的方式执行此操作,然后尝试编辑。 should work just fine. 应该工作正常。 Restart and you should see the improvement. 重新启动,您应该会看到改善。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM