Question:
I am trying to use PDFNet Android SDK with a Mock library called PowerMock.
However, I am getting the following error.
How can I use PDFNet with a Mocking library?
Answer:
There is static initilization, and loading, of our native library, when the com.pdftron.pdf.PDFNet class is loaded, and that you need to suppress.
Try adding the following.
@SuppressStaticInitializationFor("com.pdftron.pdf.PDFNet")
Source:
See #4.
For people reading this, that are using other Mock frameworks, there should be a similar, or identical, feature that you can use to suppress the static initialization.