引入project后不能Gradle出错

喝雪碧肚疼 2014-11-06 11:34:14
本人第一次引用github的开源项目,由于不太会,引入后build失败。删除后依然不能build,不知道哪里配置错误。
这是log:

Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.12/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

以下是project的gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
}
}

allprojects {
repositories {
jcenter()
}
}

这是modules的gradle:
apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion '20.0.0'

defaultConfig {
applicationId "com.example.ui"
minSdkVersion 14
targetSdkVersion 20
}

buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile 'com.android.support:support-v4:20.+'
compile 'com.android.support:appcompat-v7:20.+'
}


...全文
522 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
喝雪碧肚疼 2014-11-06
  • 打赏
  • 举报
回复
已经解决,应该是分配内存不足。 解决办法: 1 定位到目录 C:\Users\<username>\.gradle 2 创建文件gradle.properties 内容:org.gradle.jvmargs=-Xmx512m 3 重启你的Android Studio项目,搞定。

80,471

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧