Skip to content Skip to sidebar Skip to footer

Error:failed To Resolve: Com.itextpdf:itextpdf:4.2.2

I am trying to create pdf files in android using itext library. But whenever i run the project, I am getting the following error. Error:Failed to resolve: com.itextpdf:itextpdf:4.2

Solution 1:

When you want to create an Android application, you need to use iTextG, so this is correct:

compile'com.itextpdf:itextg:5.5.9'

However, you are also importing a rogue version of iText that doesn't work on Android:

compile'com.lowagie:itext:4.2.2'

You need to remove that dependency.

Please compare the package name with my name: Lowagie. I am the original developer of iText, and because of the fact that so many people contacted (or even harassed me) personally with questions about iText, I changed the package names from com.lowagie to com.itextpdf in 2009. That's almost 8 years ago.

If you see my name in your code, then you are doing something wrong. Replace all import com.lowagie instances with import com.itextpdf because I removed my name from the packaged names 8 years ago.

Post a Comment for "Error:failed To Resolve: Com.itextpdf:itextpdf:4.2.2"