I am trying to add the iTextPDF library to a Android project using Android Studio (gradle). I add the library with compile 'com.itextpdf:itextpdf:5.5.6' instruction but I am getting an error:
Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/opt/jdk1.7.0_79/bin/java'' finished with non-zero exit value 2
My build.gradle is:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "josealopez.com.software"
minSdkVersion 14
targetSdkVersion 22
versionCode 104
versionName "1.0.4"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.couchbase.lite:couchbase-lite-android:1.0.4'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.itextpdf:itextpdf:5.5.6'
}