简体   繁体   English

我如何为 Android 开发 ft. Android 工作室加速我的电脑

[英]How can I speed up my pc for Android development ft. Android studio

Now you can easily notice I am new on app development path when I am setting up Android studio for Android development I find that my pc need specific requirements (Hardware) to start现在,当我为 Android 开发设置 Android 工作室时,您可以很容易地注意到我是应用程序开发路径的新手,我发现我的电脑需要特定的要求(硬件)才能启动

But I have desktop that CPU: Core 2Duo RAM: 4 GB HDD: 500 GB但我有台式机 CPU:Core 2Duo RAM:4 GB HDD:500 GB

It's been week when I just run some basic apps but it's very headache to do it for basics app because my android studio every minute got hang and start lagging I can't open chrome there full of warehouse of my problems related to pc because of android studio这一周我只运行了一些基本应用程序,但是对于基本应用程序来说这非常令人头疼,因为我的 android 工作室每分钟都挂起并开始滞后我无法打开 chrome 那里充满了我与 pc 相关的问题仓库因为 android工作室

Anyone know any hacks or by tips for me you can feel free for it.任何人都知道任何黑客或提示给我你可以随意。

The only hacks I can think of are:我能想到的唯一技巧是:

  • Make sure you are not using a remote mounted file system or "share" for either your Android Studio + Java installation or your AS workspace.确保您没有为您的 Android Studio + Java 安装或您的 AS 工作区使用远程安装的文件系统或“共享”。

  • Shutoff (quit) all other applications that are using significant amounts of RAM;关闭(退出)所有其他使用大量 RAM 的应用程序; eg your web browsers, your email tool, Slack, Zoom, etc.例如,您的 web 浏览器、您的 email 工具、Slack、Zoom 等。

  • If you are using Windows, switch to Linux.如果您使用的是 Windows,请切换到 Linux。


Better idea: get a better development machine.更好的主意:获得更好的开发机器。 I think that the RAM is most important, because it sounds like your machine is thrashing.我认为 RAM 是最重要的,因为听起来您的机器正在抖动。

Putting it bluntly: those specs are simply not enough to do any serious modern development.坦率地说:这些规范根本不足以进行任何严肃的现代开发。 If you could replacing the HDD with an SSD (even a small, cheap one) would be the highest priority and more memory is second.如果您可以用 SSD(即使是小而便宜的)替换 HDD 将是最高优先级,更多 memory 次之。 A better CPU would obviously help, but it's a luxury, the other two items are more important.更好的 CPU 显然会有所帮助,但这是一种奢侈,其他两项更为重要。

Assuming that's not an option, you can do either of those two things:假设这不是一个选项,您可以执行以下两项操作之一:

  • don't use an IDE (or at least a more light-weight one, such as VS Code) and build your software from the command line.不要使用 IDE(或至少是更轻量级的,例如 VS Code)并从命令行构建您的软件。 This will be more painful (especially when you're just starting) and even then the resource requirements of the build will be non-trivial.这将更加痛苦(尤其是当您刚刚开始时),即使如此,构建的资源需求也将是非常重要的。
  • Make sure to do as little as possible on your local machine.确保尽可能少地在本地计算机上执行操作。 If you have a decent inte.net connection, then you might be better off developing on a free remote cloud computer and use something like Projector to show the UI in the browser.如果你有一个不错的互联网连接,那么你最好在免费的远程云计算机上开发并使用投影仪之类的东西在浏览器中显示用户界面。 I've found this repo with instructions on how to use it with Android Studio , which seems useful, but I've not verified that it works.我找到了这个 repo,其中包含有关如何将其与 Android Studio 一起使用的说明,这似乎很有用,但我尚未验证它是否有效。

It may seem unfair but Android Studio is not really suitable to run in a lower end device.这似乎不公平,但 Android Studio 并不适合在低端设备上运行。 It used to lag/hang in my device with Core i7 and 8GB Ram.它曾经在我的配备 Core i7 和 8GB Ram 的设备中滞后/挂起。 The best thing you can do is to use an SSD instead of HDD.您可以做的最好的事情是使用 SSD 而不是 HDD。 SSDs with smaller memory are often cheap and this alone can somewhat lessen your problems with Android Studio. memory 较小的 SSD 通常很便宜,仅这一点就可以在一定程度上减少 Android Studio 的问题。

i think you should change your HDD to 240 GB SSD and it will works fine我认为您应该将 HDD 更改为 240 GB SSD,它会正常工作

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

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