java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/GraphicsEnvironment;
Opened this issue · 5 comments
E: FATAL EXCEPTION: Thread-15
Process: com.pdftechnologies.pdfreaderpro, PID: 15504
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/GraphicsEnvironment;
at com.aspose.pdf.internal.l71t.lI.lj(Unknown Source)
at com.aspose.pdf.internal.l71t.lI.lI(Unknown Source)
at com.aspose.pdf.internal.l71t.lI.<clinit>(Unknown Source)
at com.aspose.pdf.internal.l71t.lI.lj(Unknown Source)
at com.aspose.pdf.internal.l67k.l1y.<clinit>(Unknown Source)
at com.aspose.pdf.internal.l67k.l1y.lI(Unknown Source)
at com.aspose.pdf.internal.l67k.ld.l0f(Unknown Source)
at com.aspose.pdf.Color.getBlack(Unknown Source)
at com.aspose.pdf.GraphInfo.<init>(Unknown Source)
at com.aspose.pdf.Page.<init>(Unknown Source)
at com.aspose.pdf.PageCollection.lI(Unknown Source)
at com.aspose.pdf.PageCollection.add(Unknown Source)
at com.aspose.pdf.PageCollection.add(Unknown Source)
at java.lang.Thread.run(Thread.java:760)
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.awt.GraphicsEnvironment" on path: DexPathList[[zip file "/data/app/com.pdftechnologies.pdfreaderpro-2/base.apk"],nativeLibraryDirectories=[/data/app/com.pdftechnologies.pdfreaderpro-2/lib/arm, /data/app/com.pdftechnologies.pdfreaderpro-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.aspose.pdf.internal.l71t.lI.lj(Unknown Source)
at com.aspose.pdf.internal.l71t.lI.lI(Unknown Source)
at com.aspose.pdf.internal.l71t.lI.<clinit>(Unknown Source)
at com.aspose.pdf.internal.l71t.lI.lj(Unknown Source)
at com.aspose.pdf.internal.l67k.l1y.<clinit>(Unknown Source)
at com.aspose.pdf.internal.l67k.l1y.lI(Unknown Source)
at com.aspose.pdf.internal.l67k.ld.l0f(Unknown Source)
at com.aspose.pdf.Color.getBlack(Unknown Source)
at com.aspose.pdf.GraphInfo.<init>(Unknown Source)
at com.aspose.pdf.Page.<init>(Unknown Source)
at com.aspose.pdf.PageCollection.lI(Unknown Source)
at com.aspose.pdf.PageCollection.add(Unknown Source)
at com.aspose.pdf.PageCollection.add(Unknown Source)
at com.aspose.pdf.ADocument.l1v(Unknown Source)
at com.aspose.pdf.ADocument.isLicensed(Unknown Source)
环境:Android Studio,Android应用,导入aspose-pdf-18.11.jar
使用:进行PDF --> Doc,Docx,PPtx,xls等转档,抛出如上异常;
请问,该Jar是否支持Android平台使用,并使用Java中所支持的转档功能。
目前Code中所支持的转档类型:
public static final int Doc = 1;
public static final int Xps = 2;
public static final int Html = 3;
public static final int Xml = 4;
public static final int TeX = 5;
public static final int DocX = 6;
public static final int Svg = 7;
public static final int MobiXml = 8;
public static final int Excel = 9;
public static final int Epub = 10;
public static final int Plugin = 11;
public static final int Pptx = 14;
联系方式:1627524135@qq.com
@chiyan171, 我们担心此JAR文件可能与Android Studio不兼容。 我们为Android环境提供Aspose.PDF for Java via Android。
如果您遇到任何问题,请随时告诉我们。
PS:我和Aspose一起担任开发者布道者。
i'm trying to convert pdf to docx but i have facing error "Failed resolution of: Ljava/awt/GraphicsEnvironment;" please explain how to solve it
Hi, I am facing the same issue regarding to "java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/GraphicsEnvironment;"
- I m using jar in android studio.
Same problem here, could you please elaborate on how to fix that
@esodot @axitasavani @laiba20000
Can you please make sure that you are using the latest available version of the API? Also, it is quite possible that you have a conflict or a mismatch between the dependencies of Aspose.PDF and other libraries you are using in your project. You can try creating an empty application and include only Aspose.PDF for Android via Java in it to test if issue still occurs. In case it does, please create a post in our official support forum where we will further proceed to assist you accordingly.