Hello All, I am facing an issue while trying to load Pdftron inside a fragment. Its crashing continuously. Sharing logs below. Please help.

android.view.InflateException: Binary XML file line #31 in com.oracle.cegbu.unifier:layout/fragment_tabbed_sub_pdfviewctrl_new: Binary XML file line #31 in com.oracle.cegbu.unifier:layout/fragment_tabbed_sub_pdfviewctrl_new: Error inflating class com.pdftron.pdf.PDFViewCtrl
Caused by: android.view.InflateException: Binary XML file line #31 in com.oracle.cegbu.unifier:layout/fragment_tabbed_sub_pdfviewctrl_new: Error inflating class com.pdftron.pdf.PDFViewCtrl
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:866)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1018)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:973)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1135)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1096)
at android.view.LayoutInflater.inflate(LayoutInflater.java:694)
at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
at android.view.ViewStub.inflateViewNoAdd(ViewStub.java:272)
at android.view.ViewStub.inflate(ViewStub.java:305)
at com.pdftron.pdf.controls.PdfViewCtrlTabBaseFragment.loadStubPDFViewCtrl(PdfViewCtrlTabBaseFragment.java:3705)
at com.pdftron.pdf.controls.PdfViewCtrlTabBaseFragment.loadPDFViewCtrlView(PdfViewCtrlTabBaseFragment.java:3716)
at com.pdftron.pdf.controls.PdfViewCtrlTabFragment2.loadPDFViewCtrlView(PdfViewCtrlTabFragment2.java:271)
at com.pdftron.pdf.controls.PdfViewCtrlTabBaseFragment.onViewCreated(PdfViewCtrlTabBaseFragment.java:1298)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3128)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:552)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1817)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1760)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2985)
at androidx.fragment.app.FragmentManager.dispatchViewCreated(FragmentManager.java:2888)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3129)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:552)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1817)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1760)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2985)
at androidx.fragment.app.FragmentManager.dispatchViewCreated(FragmentManager.java:2888)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3129)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:552)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1817)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1760)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:547)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
2024-11-06 15:47:01.495 12128-12128 AndroidRuntime com.oracle.cegbu.unifier E at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for long com.pdftron.pdf.Rect.RectCreate(double, double, double, double) (tried Java_com_pdftron_pdf_Rect_RectCreate and Java_com_pdftron_pdf_Rect_RectCreate__DDDD) - is the library loaded, e.g. System.loadLibrary?
at com.pdftron.pdf.Rect.RectCreate(Native Method)
at com.pdftron.pdf.Rect.(SourceFile:30)
at com.pdftron.pdf.PDFViewCtrl$u.(SourceFile:11087)
at com.pdftron.pdf.PDFViewCtrl.(SourceFile:15869)
at com.pdftron.pdf.PDFViewCtrl.(SourceFile:1944)

1 Like

Hello and thank you for reaching out for Support through our Forum. According to our Engineering team, this seems like it might be a PDFNet initialization issue, the issue usually occurs if the project is using our API before initialization. How are you initializing the Library? As a potential solution, You can try initializing manually: Add-license | Apryse Documentation

1 Like