I\'m getting the following error when including iTextG in Android Studio,
com.android.dex.DexException: Multiple dex files define Lcom/itextpdf/awt/geom/AffineTr
Please read the exception carefully. It talks about com.itextpdf.awt
. That is not the same as the forbidden java.awt
.
Your allegation that awt is still in the library is wrong. The com.itextpdf.awt
package is there to replace the forbidden AWT classes. Those replacement classes as such are perfectly valid and can be used on Android.
The problem you are experiencing is explained in the error message: the class com.itextpdf.awt.geom.AffineTransform
is defined in different DEX files. This means that you are using more than just iTextG 5.5.x. You have more than one iTextG on your device. Remove them all and make sure you add only a single instance of iTextG.