Including iTextG in an Android Project using Android Studio

后端 未结 1 1012
粉色の甜心
粉色の甜心 2021-01-29 09:06

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         


        
相关标签:
1条回答
  • 2021-01-29 09:46

    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.

    0 讨论(0)
提交回复
热议问题