Android JRE System library (java.awt.*) is missed

后端 未结 5 959
眼角桃花
眼角桃花 2020-12-21 05:10

I\'m trying to run pdfbox.jar library on Android and seems like I do everything right. I use Eclipse pluging to deploy the project. The code is very simple just call for pd

5条回答
  •  有刺的猬
    2020-12-21 05:31

    The problem is due to the lack of AWT support in android, as others have indicated. A work-around for you could be to use the android port of PDFBox:

    https://github.com/Birdbrain2/PdfBox-Android

    tldr; replace your gradle dependency on PDFBox with this: org.apache:pdfbox-android:latest version here, and consider adding MultiDex support to your app if you get a DexIndexOverflowException exception.

提交回复
热议问题