Sol*_*ell 13 android android-gradle-plugin
我正在尝试运行我的项目,但我不断收到此错误:
错误:任务':app:preDexDebug'的执行失败.com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java''完成非零退出值3
这是我的傻瓜:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.blume.android"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(path: ':endpoints-backend', configuration: 'android-endpoints')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
compile project(path: ':cloud-backend', configuration: 'android-endpoints')
compile 'javax.persistence:persistence-api:1.0'
compile project(':endpoints-backend')
}
Run Code Online (Sandbox Code Playgroud)
所有帮助表示赞赏.
小智 57
添加这个:
android {
// Other stuffs
dexOptions {
javaMaxHeapSize "4g"
}
}
Run Code Online (Sandbox Code Playgroud)
小智 27
我改变了
" 编译 fileTree(dir:'libs',包括:['*.jar'])"
至
" 提供了 fileTree(dir:'libs',包括:['*.jar'])".
它解决了我的问题
将HEAP尺寸增加至2g或4g.
android {
defaultConfig {}
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
}
buildTypes {
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
17928 次 |
| 最近记录: |