【亲测有效】andriod studio性能优化
生活随笔
收集整理的這篇文章主要介紹了
【亲测有效】andriod studio性能优化
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
實(shí)現(xiàn)原理
主要優(yōu)化的方面:
1. 分配內(nèi)存
找到andriod studio的安裝目錄。
Android_Studio/bin/studio64.exe.vmoptions
打開來是像下圖的數(shù)據(jù):
把這兩項(xiàng)調(diào)高就行,它對應(yīng)的andriod studio的啟動內(nèi)存。
推薦使用我上面的配置,或者再分配多些。
2.1 手動更新Gradle
首先看下你項(xiàng)目的Gradle需要的版本。
例如我的路徑:
C:\Users\Administrator\.gradle\wrapper\dists國內(nèi)下載gradle網(wǎng)速慢,改用騰訊gradle鏡像直接下載
https://mirrors.cloud.tencent.com/gradle/
下載對應(yīng)的gradle復(fù)制到下圖類似的目錄,
C:\Users\dell.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb
把下載好的zip,拖動到對應(yīng)文件夾中。(.gradle\wrapper\dists\Gradle版本號)
2.2 配置Gradle國內(nèi)鏡像
鏡像配置信息如下:
repositories {maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }google()jcenter()}總結(jié)
以上是生活随笔為你收集整理的【亲测有效】andriod studio性能优化的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Python代码如何写的更优雅
- 下一篇: 【Python】PAT-1024-科学计