Adding iText 5.5.6 to Android project with gradle exception
10,262
Solution 1
I put these two dependencies in the gradle:
compile 'com.itextpdf:itext-pdfa:5.5.10'
compile 'com.itextpdf:itextg:5.5.9'
Solution 2
Use these dependencies:
compile 'com.itextpdf:itext-pdfa:5.5.10'
compile 'com.itextpdf:itextg:5.5.10'
compile group: 'com.itextpdf.tool', name: 'xmlworker', version: '5.5.10'
Solution 3
I have this issue try 5.5.10 it worked for me
compile 'com.itextpdf:itextg:5.5.10'
Author by
Jose A Lopez Pastor
Updated on June 04, 2022Comments
-
Jose A Lopez Pastor about 2 years
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' }