Android Studio编译卡死
首先,用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编译卡死的更多相关文章
- android studio 编译加速
1. http://www.52codes.net/article/658.html 2.http://my.oschina.net/sammy1990/blog/388846 3.http://st ...
- 手把手图文并茂教你用Android Studio编译FFmpeg库并移植
转载请把头部出处链接和尾部二维码一起转载,本文出自逆流的鱼yuiop:http://blog.csdn.net/hejjunlin/article/details/52661331 之前曾写过一篇&l ...
- 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. ...
- 【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 ...
- 我的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 ...
- Android Studio编译慢、卡死和狂占内存怎么破?
https://www.zhihu.com/question/27953288 作者:知乎用户链接:https://www.zhihu.com/question/27953288/answer/118 ...
- 基于android studio编译工具下的android开发之IBeacon 例子
想直接看主要内容的请调到红字下面. 之所以会接触到android下的IBeacon,是因为我自己导师给的任务.一个网址http://estimote.com/和一句话:看看这个网站,然后试下在安卓手机 ...
- eclipse 和 android studio 编译时报 Unsupported major.minor version 52.0错解决办法
version 52.0 是java8的环境.当gradle tools 升级到2.2.1时候,可能编译时候会报该错误. 很多网友说更改java version,但是很多时候无效.下面是我遇到时候的解 ...
- windows android studio 编译Jni动态库
项目需要,折腾了半天搞定windows android studio环境编译Jni动态库,现记录下来. 准备安装环境: 1. android studio 下载地址是http://www.androi ...
随机推荐
- SDOI2019游记
Day0 一大早就起床,结果忙活了整整一上午. 12:20从gryz出发,路上发现把耳机和笔忘另一个背包里了(都怪老爸非得让我换背包),15:30差不多就到山师了. 山师也是蛮漂亮的,花开得挺好.到处 ...
- 没想到: System.out.println(n1 == f1 ? n1 : f1);
int n1 = 404; float f1 = 404.0f; if(n1 == f1) { System.out.println("两者相等"); } System.out.p ...
- Hbase-site.xml
生产环境基于 HA HDFS 的Hbase 基本优化后配置(无安全版本) hbase.rest.port 60050 hbase.cluster.distributed true hbase.root ...
- DataTable行列转置
DataTable dtNew = new DataTable(); dtNew.Columns.Add("ColumnName", typeof(string)); ; i &l ...
- Date Structure01-绪论作业
一.作业题目 仿照三元组或复数的抽象数据类型写出有理数抽象数据类型的描述 (有理数是其分子.分母均为整数且分母不为零的分数). 有理数基本运算:1.构造有理数T,元素e1,e2分别被赋以分子.分母值2 ...
- sorted
排序是编程中经常使用到的算法,无论哪种排序算法, 本质上都是比较两个元素的大小.如果是数字,可以直接比较,但是如果是字符串或者是dict呢?直接比较数学上的大小是没有意义的,因此,比较的过程必须通过函 ...
- Python-Struct
从一个例子开始: >>> from struct import * >>> pack('hhl',1655, 255, 370) b'w\x06\xff\x00r\ ...
- C语言通讯录系统——C语言单向链表实现
实现的通讯录功能有:查看通讯录.添加联系人.删除联系人.查询联系人.保存并退出. 通过txt文件保存和读取通讯录数据. #include <stdio.h> #include <st ...
- 分布式系列十五: MongoDB数据库
MongoDB 是基于分布式文件存储的数据库. 开发语言是C++. 具有高性能,可扩展的特点. 是NoSql中最像关系数据库的. 什么是NoSql NoSQL 是 Not only SQL 的缩写. ...
- 基于注解的SpringMVC自定义DispatcherServlet配置
通过重载AbstractAnnotationConfigDispatcherServletInitializer实现类的customizeRegistration()方法来自定义DispatcherS ...