首先,用AS,你必须fanqiang,其它都是次要的。

AS/bin/*.exe.vmoptions

#
# *DO NOT* modify this file directly. If there is a value that you would like to override,
# please add it to your user specific configuration file.
#
# See http://tools.android.com/tech-docs/configuration
#
-Xms256m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-da
-Djna.nosys=true
-Djna.boot.library.path=

-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-Didea.paths.selector=AndroidStudio2.1
-Didea.platform.prefix=AndroidStudio

其次,用户/.gradle/gradle.properties(没有的直接自己创建属性文件)

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
# TODO: disable daemon on CI, since builds should be clean and reliable on servers
org.gradle.daemon=true
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
# Enables new incubating mode that makes Gradle selective when configuring projects.
# Only relevant projects are configured which results in faster builds for large multi-projects.
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:configuration_on_demand
org.gradle.configureondemand=true
# Project-wide Gradle settings.

再次,

最后,至于很多文章说要打开gradle的离线模式,这里我想根据使用经验说一下,首先做android,你得fq,我并不建议不熟悉gradle的人直接将该模式打开,这是其一,其二使用AS时,一定记得把杀毒软件或者防火墙关闭了,某数字卫士和动物卫士经常导致我编译假死,当时我还来回重装,来回设置。

Android Studio编译卡死的更多相关文章

  1. android studio 编译加速

    1. http://www.52codes.net/article/658.html 2.http://my.oschina.net/sammy1990/blog/388846 3.http://st ...

  2. 手把手图文并茂教你用Android Studio编译FFmpeg库并移植

    转载请把头部出处链接和尾部二维码一起转载,本文出自逆流的鱼yuiop:http://blog.csdn.net/hejjunlin/article/details/52661331 之前曾写过一篇&l ...

  3. Android studio 编译失败Error:Could not read entry ':app:processDebugManifest' from cache taskArtifacts.b

    Android studio 编译失败 Error:Could not read entry ':app:processDebugManifest' from cache taskArtifacts. ...

  4. 【Android】Android studio 编译问题:finished with non-zero exit value 2

    1.Android studio 编译问题:finished with non-zero exit value 2 问题: Error:Execution failed for task ':andr ...

  5. 我的Android进阶之旅------>解决Android Studio编译后安装apk报错:The APK file does not exist on disk

    1.错误描述 今天用Android Studio编译应用后安装APK的时候,报错了,错误如下所示: The APK file build\outputs\apk\OYP_2.3.4_I2Base_64 ...

  6. Android Studio编译慢、卡死和狂占内存怎么破?

    https://www.zhihu.com/question/27953288 作者:知乎用户链接:https://www.zhihu.com/question/27953288/answer/118 ...

  7. 基于android studio编译工具下的android开发之IBeacon 例子

    想直接看主要内容的请调到红字下面. 之所以会接触到android下的IBeacon,是因为我自己导师给的任务.一个网址http://estimote.com/和一句话:看看这个网站,然后试下在安卓手机 ...

  8. eclipse 和 android studio 编译时报 Unsupported major.minor version 52.0错解决办法

    version 52.0 是java8的环境.当gradle tools 升级到2.2.1时候,可能编译时候会报该错误. 很多网友说更改java version,但是很多时候无效.下面是我遇到时候的解 ...

  9. windows android studio 编译Jni动态库

    项目需要,折腾了半天搞定windows android studio环境编译Jni动态库,现记录下来. 准备安装环境: 1. android studio 下载地址是http://www.androi ...

随机推荐

  1. MySQ数据备份

    MySQL备份概述 问题:备份和冗余有什么区别? 备份:能够防止由于机械故障以及人为操作带来的数据丢失,例如将数据库文件保存在了其它地方. 冗余:数据有多份冗余,但不等于备份,只能防止机械故障带来的数 ...

  2. 【一本通1248:Dungeon Master&&洛谷UVA532 Dungeon Master】

    若不会广搜转向[广搜] [题目描述] 这题是一个三维的迷宫题目,其中用‘.’表示空地,‘#’表示障碍物,‘S’表示起点,‘E’表示终点,求从起点到终点的最小移动次数,解法和二维的类似,只是在行动时除了 ...

  3. eclipse安装cucumber插件

    help-install new software-add name= c location= http://cucumber.github.com/cucumber-eclipse/update-s ...

  4. Neo4j使用

    一.删除图 在开发过程中,很多时候需要快(简)速(单)清(粗)除(暴)Neo4j中存在的海量数据节点和关系数据 在这种情况下,delete和detach从性能上都已力不从心.Neo4j官方推荐清库方法 ...

  5. 一个网站SQL注入的案例

    网站的页面提交参数做了md5转换,而且参数会带入两个SQL语句中执行. 注入是肯定存在的,但是SQLMAP怎么都跑不出来(可能原因是其中有个SQL语句总是报错). 尝试手工,发现 order by 报 ...

  6. 004 使用scrapy框架爬虫

    0. 建立housePro的scrapy爬虫框架 # 1. 在终端输入,建立housePro项目scrapy startproject housePro# 2. 进入houseProcd houseP ...

  7. 2018-2019-2 网络对抗技术 20165337 Exp4 恶意代码分析

    1.实践目标 1.1是监控你自己系统的运行状态,看有没有可疑的程序在运行. 1.2是分析一个恶意软件,就分析Exp2或Exp3中生成后门软件:分析工具尽量使用原生指令或sysinternals,sys ...

  8. Linux查看日志工具

    ⒈journalctl journalctl是Centos7才有的工具用于systemd统一管理所有unit的启动日志,只用一个journalctl命令就可以查看所有的日志(包括内核日志和应用日志), ...

  9. ffmpeg错误:Invalid UE golomb code

    解决方案在github https://github.com/FFmpeg/FFmpeg/commit/c51c08e0e70c186971385bdbb225f69edd4e3375 问题简要描述为 ...

  10. multiwan 脚本

    以下为校区ACM实验室多拨脚本,使用了macvlan模块,具体策略路由和连接标记等思路就不解释了. #! /bin/bash getip() { |grep -o -e 'inet addr:[^ ] ...