2016-01-13 35 views
0

我的應用程序,直到我加入了貝寶的依賴,以我的應用程序,它是做工精細compile 'com.paypal.sdk:paypal-android-sdk:2.12.5'貝寶相依誤差與現有​​項目

的錯誤是:

錯誤:執行失敗的任務「:應用程序:dexDebug」 。

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

我試過multiDexEnabled true但也沒有幫助。

這裏是我的build.gradle(模塊:APP)

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.1" 
defaultConfig { 
    applicationId "com.example.kiwakosan.testing" 
    minSdkVersion 17 
    targetSdkVersion 23 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
productFlavors { 
} 
} 

dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
testCompile 'junit:junit:4.12' 
compile project(':lib') 
compile 'com.android.support:appcompat-v7:23.1.1' 
compile 'com.android.support:design:23.1.1' 
compile 'com.google.android.gms:play-services:8.3.0' 
compile 'com.google.android.gms:play-services-ads:8.3.0' 
compile 'com.google.android.gms:play-services-identity:8.3.0' 
compile 'com.google.android.gms:play-services-gcm:8.3.0' 
compile 'com.mcxiaoke.volley:library:1.0.19' 
//compile 'com.mcxiaoke.volley:library-aar:1.0.1' 
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' 
compile 'me.dm7.barcodescanner:zbar:1.8.3' 
compile 'com.android.support:support-v4:23.1.1' 
compile 'de.hdodenhof:circleimageview:1.2.1' 
compile 'com.paypal.sdk:paypal-android-sdk:2.12.5' //recently added 
} 
+0

這聽起來像您的lib文件夾中有PayPal SDK。刪除它,它應該工作。 – apmartin1991

+0

我可以知道你引用了哪個lib文件夾嗎? 'compile project(':lib')'沒有PayPal SDK @ apmartin1991 – Noob

回答

0

添加此到您的build.gradle(模塊的應用程序)

android{ 
    packagingOptions{ 
      exclude 'AndroidManifest.xml' 
      exclude 'lib/arm64-v8a/libcardioDecider.so' 
      exclude 'lib/arm64-v8a/libcardioRecognizer.so' 
      exclude 'lib/arm64-v8a/libcardioRecognizer_tegra2.so' 
      exclude 'lib/arm64-v8a/libopencv_core.so' 
      exclude 'lib/arm64-v8a/libopencv_imgproc.so' 
      exclude 'lib/armeabi/libcardioDecider.so' 
      exclude 'lib/armeabi-v7a/libcardioDecider.so' 
      exclude 'lib/armeabi-v7a/libcardioRecognizer.so' 
      exclude 'lib/armeabi-v7a/libcardioRecognizer_tegra2.so' 
      exclude 'lib/armeabi-v7a/libopencv_core.so' 
      exclude 'lib/armeabi-v7a/libopencv_imgproc.so' 
      exclude 'lib/mips/libcardioDecider.so' 
      exclude 'lib/x86/libcardioDecider.so' 
      exclude 'lib/x86/libcardioRecognizer.so' 
      exclude 'lib/x86/libcardioRecognizer_tegra2.so' 
      exclude 'lib/x86/libopencv_core.so' 
      exclude 'lib/x86/libopencv_imgproc.so' 
      exclude 'lib/x86_64/libcardioDecider.so' 
      exclude 'lib/x86_64/libcardioRecognizer.so' 
      exclude 'lib/x86_64/libcardioRecognizer_tegra2.so' 
      exclude 'lib/x86_64/libopencv_core.so' 
      exclude 'lib/x86_64/libopencv_imgproc.so' 
     } 
} 

,並添加依賴

dependencies { 
     compile 'com.paypal.sdk:paypal-android-sdk:2.14.1' 
    } 

希望它會適用於你