2015-07-24 18 views
6

Projem 3 kütüphaneleri içerir: calendar_cmcc, Wheel_library ve yellowPage_lib.gradle sıfır olmayan çıkış değeri ile tamamladı 3

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 dosya listesi:

uygulamanın build.gradle

Gayet projeyi inşa edebilirsiniz, ama it.Here çalıştırdığınızda gradle bir hata atar hatadır :

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:[email protected]' 
      compile 'jp.wasabeef:recyclerview-animators:[email protected]' 
      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') 
     } 

build.gradlearasındacalendar_cmcc:

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 'dnsjava:dnsjava: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') 
    } 

build.gradle ait Wheel_library:

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') 
    } 

build.gradle ait yellowPage_lib:

 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') 
     } 

Şimdi, tüm ı kown hata olduğunu calendar_cmcc'inneden oldubuild.gradle dosyası. calendar_cmcc'in build.gradle bağımlılıklarını 'sağlanan' olarak değiştirdiğimde, düzgün çalışıyor.

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 'dnsjava:dnsjava: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') 
    } 

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: 'jsoup' 
      exclude group: 'org.freemarker', module: 'freemarker' 
      exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core' 
     } 
     compile 'dnsjava:dnsjava: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') 
    } 

değiştirildi ama başka hataya neden olur:

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 

O org.mnode.ical4j Apk'nizin zaman içinde paket olamaz gibi görünüyor kürek inşa.

Birçok gün için stackoverflow üzerindeki cevabı arayabilirim, ancak çalışamaz. Peki, nasıl yapmalıyım? ! Yardım lütfen teşekkürler

+3

çok fazla dosya içeriyor, bir sorun atacağım Android stüdyo: sıfırdan farklı çıkış değeri 3'lü ile bitmiş değil fikir intellij için, Android stüdyo için bir sınırlama. Yani, sadece ekleyin: dexOptions { javaMaxHeapSize "4g" } app.gradle dosyaları için ve iyi çalışacaktır.Öncelikle, yukarıda açıklanan sorun çözüldükten sonra başka bir soruna neden olacaktır: *** bulunamadı. jar veya ***. sınıf dosyaları.Bu 65k yöntemi sorunu olmalı, bu yüzden bu bağlantıyı görünebilir: https: //developer.android.com/tools/building/multidex.html –

cevap

18

ben re-post burada jim.zhang cevabını: (Bu soruyu görüntülemek ilk zamandan beri, ben cevapsız zhang yorumu)

aşağıda ekle build.gradle dosyasında yapılandırmak . Ben myself.When Projenizin bunu çözmüş

dexOptions { 
    javaMaxHeapSize "4g" 
} 
+1

Teşekkürler! Ve muhtemelen another Başka bir soruna neden olacak: *** bulunamadı kavanoz veya ***. android { dexOptions { javaMaxHeapSize "4g: Ben ekleyerek aynı deneyin yaptılar –

+0

developer.android.com/tools/building/multidex.html: Bu bağlantıyı bakmak shuld böylece sınıf files.It, 65k yöntem sorunu olmalı " " } , build.gradle içine. Teşekkürler @ Anh-Tuan Mai – Alexiscanny

İlgili konular