Merott / nativescript-pdf-view

A basic PDF viewer plugin for NativeScript. Now maintained by @madmas: github.com/madmas/nativescript-pdf-view
Other
32 stars 35 forks source link

Error: Building UI from XML: '~/tns_modules/nativescript-pdf-view' not found for element #29

Closed ghost closed 6 years ago

ghost commented 6 years ago

I might be doing something wrong but I get the following error when navigating to a page that includes this plugin:

System.err: Error: Building UI from XML. @file:///app/views/document/document.xml:16:9 System.err: > Module '/data/data/com.company.app/files/app/tns_modules/nativescript-pdf-view' not found for element 'nativescript-pdf-view:PDFView'. System.err: > Cannot read property 'OnLoadCompleteListener' of undefined System.err: File: "file:///data/data/com.company.app/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 208, column: 20

Already followed https://bradmartin.net/2016/07/20/ahhh-this-nativescript-plugin-doesnt-work/ I'm using vanilla NS+JS:

<Page 
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:pdf="nativescript-pdf-view"
loaded="loaded">

    <Page.actionBar>
        <ActionBar title="App">
        </ActionBar>
    </Page.actionBar>

    <pdf:PDFView src="{{ link }}" />

</Page>

Thank you for your help.

ghost commented 6 years ago

Seems like following these steps fixed the issue: