android – gradle用非零退出值3完成

android – gradle用非零退出值3完成,第1张

概述我的项目包含3个库:calendar_cmcc,Wheel_library和yellowPage_lib. 我可以完美地构建项目,但gradle在运行时抛出错误.这是错误: Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.proc 我的项目包含3个库:calendar_cmcc,Wheel_library和yellowPage_lib.

我可以完美地构建项目,但gradle在运行时抛出错误.这是错误:

Error:Execution Failed for task ':app:dexDeBUG'.

com.androID.IDe.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘/home/jim/tools/jdk1.8.0_45/bin/java” finished with non-zero exit value 3

gradle文件列表:

app的build.gradle:

apply plugin: 'com.androID.application'        androID {            compileSdkVersion 21            buildToolsversion '21.1.2'            defaultConfig {                applicationID "cn.com.geartech.app"                minSdkVersion 17                targetSdkVersion 19                versionCode 100 //from 20 to 21                //cmcc0000522 is 26                //0608 is                // 27                //0615 is 27                //0616 is 27                //1.2.20 36                versionname "1.2.26.10"                multIDexEnabled = true            }            buildTypes {                release {                    MinifyEnabled false                    proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro'                }                deBUG {                    signingConfig signingConfigs.deb                }            }            packagingOptions {                exclude 'meta-inf/DEPENDENCIES'                exclude 'meta-inf/NOTICE'                exclude 'meta-inf/liCENSE'                exclude 'meta-inf/liCENSE.txt'                exclude 'meta-inf/NOTICE.txt'                exclude 'meta-inf/ASL2.0'            }            sourceSets {                main {                    jnilibs.srcDir 'src/main/libs'                }            }            compileOptions {                sourceCompatibility JavaVersion.VERSION_1_7                targetCompatibility JavaVersion.VERSION_1_7            }        }        dependencIEs {            compile 'com.androID.support:support-v4:20.+'            compile 'com.androID.support:recyclervIEw-v7:21.0.0'            compile 'com.daimajia.swipelayout:library:1.2.0@aar'            compile 'jp.wasabeef:recyclervIEw-animators:1.0.3@aar'            compile filetree(include: ['*.jar'],dir: 'libs')            compile files('src/main/libs/commons-io-2.4.jar')            compile files('src/main/libs/httpmime-4.1.1.jar')            compile files('src/main/libs/pinyin4j-2.5.0.jar')            compile files('src/main/libs/universal-image-loader-1.9.3-with-sources.jar')            compile files('src/main/libs/zxing.jar')            compile 'com.sothree.slIDinguppanel:library:3.0.0'            compile files('src/main/libs/cmcc-sso-sdk.jar')            compile files('src/main/libs/cmcc-sso.jar')            compile files('src/main/libs/cmcc_enc.jar')            compile files('src/main/libs/AOE_20140617_001.jar')            compile files('src/main/libs/sync_sdk_ydyjyxgh_20150304.jar')            compile files('src/main/libs/fastJson-1.2.5.jar')            compile project(':yellowPage_lib')            compile project(':Wheel_library')            compile project(':calendar_cmcc')            compile files('src/main/libs/pinyin4j.jar')            compile files('src/main/libs/gcordSDK.jar')        }

calendar_cmcc的build.gradle:

apply plugin: 'com.androID.library'    androID {        compileSdkVersion 21        buildToolsversion "21.1.2"        defaultConfig {            minSdkVersion 17            targetSdkVersion 17            versionCode 1            versionname "1.0"        }        buildTypes {            release {                MinifyEnabled false                proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro'            }        }        productFlavors {        }        lintoptions {            abortOnError false        }        packagingOptions {            exclude 'meta-inf/liCENSE.txt'            exclude 'meta-inf/NOTICE.txt'        }    }    configurations.all {        exclude module: 'commons-logging'    }    dependencIEs {        compile filetree(include: ['*.jar'],dir: 'libs')        compile 'commons-lang:commons-lang:2.6'        compile 'commons-io:commons-io:2.4'        compile 'org.projectlombok:lombok:1.14.8'        compile 'org.mnode.ical4j:ical4j:1.0.6'        compile('com.Googlecode.ez-vcard:ez-vcard:0.9.6') {            exclude group: 'org.Jsoup',module: 'Jsoup'            exclude group: 'org.freemarker',module: 'freemarker'            exclude group: 'com.fasterxml.jackson.core',module: 'jackson-core'        }        compile '@R_301_4782@:@R_301_4782@:2.1.6'        compile files('lib/httpclIEnt-androID-4.3.5.2-davdroID1.jar')        compile('org.simpleframework:simple-xml:2.7.1') {            exclude group: 'stax',module: 'stax-API'            exclude group: 'xpp3',module: 'xpp3'        }        compile 'com.androID.support:appcompat-v7:18.0.0'        compile files('libs/androID-common-chips.jar')        compile files('libs/androID-common.jar')        compile files('libs/calendar-common.jar')    }

Wheel_library的build.gradle:

apply plugin: 'com.androID.library'    androID {        compileSdkVersion 21        buildToolsversion '21.1.2'        defaultConfig {            minSdkVersion 17            targetSdkVersion 19            versionCode 1            versionname "1.0"        }        buildTypes {            release {                MinifyEnabled false                proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro'            }        }    }    dependencIEs {        compile filetree(include: ['*.jar'],dir: 'libs')    }

yellowPage_lib的build.gradle:

apply plugin: 'com.androID.library'        androID {            compileSdkVersion 21            buildToolsversion '21.1.2'            defaultConfig {                minSdkVersion 8                targetSdkVersion 19            }            buildTypes {                release {                    MinifyEnabled false                    proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.txt'                }            }        }        dependencIEs {            compile 'com.androID.support:support-v4:19.+'            compile files('libs/BaIDulBS_AndroID.jar')            compile files('libs/YellowPage_SDK.jar')        }

现在,我所知道的是错误是由calendar_cmcc的build.gradle文件引起的.当我从calendar_cmcc的build.gradle将’compile’更改为’提供’的依赖项时,它运行正常.

dependencIEs {        compile filetree(include: ['*.jar'],module: 'xpp3'        }        compile 'com.androID.support:appcompat-v7:18.0.0'        compile files('libs/androID-common-chips.jar')        compile files('libs/androID-common.jar')        compile files('libs/calendar-common.jar')    }

变成

dependencIEs {        compile filetree(include: ['*.jar'],dir: 'libs')        compile 'commons-lang:commons-lang:2.6'        compile 'commons-io:commons-io:2.4'        provIDed 'org.projectlombok:lombok:1.14.8'        provIDed 'org.mnode.ical4j:ical4j:1.0.6'        provIDed ('com.Googlecode.ez-vcard:ez-vcard:0.9.6') {            exclude group: 'org.Jsoup',module: 'xpp3'        }        compile 'com.androID.support:appcompat-v7:18.0.0'        compile files('libs/androID-common-chips.jar')        compile files('libs/androID-common.jar')        compile files('libs/calendar-common.jar')    }

但它会导致另一个错误:

07-24 15:54:41.991   32166-1373/cn.com.geartech.app E/dalvikvm﹕ Could not find class 'net.fortuna.ical4j.model.DefaultTimeZoneRegistryFactory',referenced from method at.bitfire.davdroID.resource.Event.<clinit>    07-24 15:54:42.001   32166-1373/cn.com.geartech.app E/dalvikvm﹕ Could not find class 'net.fortuna.ical4j.data.CalendarBuilder',referenced from method at.bitfire.davdroID.resource.Event.TimezoneDefToTzID    07-24 15:54:42.021   32166-1373/cn.com.geartech.app E/dalvikvm﹕ Could not find class 'net.fortuna.ical4j.util.UIDGenerator',referenced from method at.bitfire.davdroID.resource.Event.generateUID    07-24 15:54:42.061   32166-1373/cn.com.geartech.app E/dalvikvm﹕ Could not find class 'net.fortuna.ical4j.data.CalendarBuilder',referenced from method at.bitfire.davdroID.resource.Event.parseEntity

似乎org.mnode.ical4j在gradle构建时无法在apk中打包.

我已经在stackoverflow上搜索了很多天的答案,但它无法正常工作.
那么,我该怎么办?帮助,请!谢谢!

解决方法 我在这里重新发布了jim.zhang的答案:
(自从我第一次看到这个问题以来,我就错过了张的评论)

在build.gradle文件中添加以下configure.

dexOptions {    javaMaxHeapSize "4g"}
总结

以上是内存溢出为你收集整理的android – gradle用非零退出值3完成全部内容,希望文章能够帮你解决android – gradle用非零退出值3完成所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1134747.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存