Android Studio编译卡死

首先,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时,一定记得把杀毒软件或者防火墙关闭了,某数字卫士和动物卫士经常导致我编译假死,当时我还来回重装,来回设置。

时间: 2024-12-06 19:21:36

Android Studio编译卡死的相关文章

Error:Execution failed for task ':app:compileDebugAidl'. > aidl is missing(Android Studio编译错误)

今天下载了一个1.2.1.1版本的Android Studio,使用VPN更新好SDK之后就新建了一个hello world工程测试一下环境,然后就出现以下错误: Error:Execution failed for task ':app:compileDebugAidl'. > aidl is missing 什么情况?全新安装的环境也有错误?Google发布这个工具时没有测试好吗? 没搞过这个工具,一阵搜索得到以下方案: 1.右键工程->Open Module Settings 2.将Bu

我的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_6476_official_debug.apk does not exist on disk. Error while Installing APK 如下图所示 2.解决方法 1.尝试了Build -> Clean Project再编译,还是无效 2.尝试重启Android Studio无效 然后我去打

Ubuntu下android studio 编译报错A problem occurred starting process 'command '/Android/Sdk/build-tools/21.1.2/aapt''

此问题在stack  over flow 上找到答案. 原链接地址:http://stackoverflow.com/questions/27589844/android-studio-1-0-2-not-building-appmergedebugresources-error 解决方法: //在终端分别运行下面两条指令,安装lib32stdc++6 和lib32z1 sudo apt-get install lib32stdc++6 sudo apt-get install lib32z1

Android Studio编译运行Fresco Sample。Android缓存新境界。 (a problem occurred start process 'command 'ndk-build'')

今天闲逛知乎,偶遇一篇“Android应用开发难点”,作为安卓程序猿,本能点进去,想看看究竟能有什么难点自己不知道的(夜郎自大..面壁中). 插件化,H5容器优化,网络.图片缓存..感觉都还好.直到看到“Fresco出来之前,你是不是觉得图片缓存已经到头了?” Fresco究竟是何方神圣!! 询问度娘得知,2015.3.27日之前就已经发布了(度娘的结果最早是3.27).通过查看GitHub: Version 0.1.0  tyronen released this 16 days ago · 

Android Studio编译好的apk放在哪里?

Eclipse中编译好的apk文件时在bin文件里面的,但是在Android Studio有一个比较大的改动了,编译好的apk在android studio里面是直接看不到了,而且apk文件所在目录也变了,那apk文件放在哪呢,你要在硬盘中找到对应的工程目录: E:\StudioDemo\MyApplication\app\build\outputs\apk 其中app是你的module,记得一定要在对应的module下找对应的编译好的apk文件. Android Studio编译好的apk放在

「android」Ubuntu下android studio 编译报错A problem occurred starting process 'command '/Android/Sdk/build-tools/21.1.2/aapt''(转)

转自”http://www.cnblogs.com/jonzone/p/5246531.html“ 此问题在stack  over flow 上找到答案. 原链接地址:http://stackoverflow.com/questions/27589844/android-studio-1-0-2-not-building-appmergedebugresources-error 解决方法: //在终端分别运行下面两条指令,安装lib32stdc++6 和lib32z1 sudo apt-get

Android Studio编译大工程报错:java.exe'' finished with non-zero exit value 1

版权声明:本文为博主原创文章,未经博主允许不得转载. Android Studio编译大工程报错:java.exe'' finished with non-zero exit value 1

Execution failed for task ':dexDebug' Android Studio 编译失败

刚刚编译android studio的时候,控制台报错,说某某某return 2.... 这个问题的正确解决方法是: 项目对应的build.gradle里面添加的依赖项有问题,只能是删除某个依赖项,然后重新运行知道运行成功为止!! 告诉大家个小窍门,一般都是最后一次添加的依赖项有问题,大家可以从最后一项逐项的注销依赖项,知道运行成功为止. Execution failed for task ':dexDebug' Android Studio 编译失败

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.bin 升级了Android studio 2.0 版本号后 编译之前的项目失败 出现了以下提示: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/