简体   繁体   中英

Flutter: MissingPluginException(No implementation found for method printPdf on channel net.nfet.printing)

guys. I am developing a desktop POS application for a shop. The application should have a feature to print some docs and barcodes. I have used pdf package to generate pdfs, but I am having a trouble with installing and using the priting package on Windows.

The main problem is with isntallation. In the docs, it says you should add the following lines in

CMakeLists.txt

file:

...
set(PDFIUM_VERSION "4929" CACHE STRING "" FORCE)
set(PDFIUM_ARCH "x64" CACHE STRING "" FORCE)
...
  1. I am very confused in which CMakeLists.txt I shall put, because flutter's windows folder includes multiple files with the same name and extension. ( windows\CMakeLists.txt, windows\runner\CMakeLists.txt, windows\flutter\CMakeLists.txt )
  2. I have put the same piece of code into these different files, but none of them worked.
  3. It always gives some errors like below: errors

The thing I wanted to accomplish is to just print a generated PDF: code

I'm having the same issue

What I do is

  • Flutter clean
  • Flutter pub get
  • Uninstall the previous application
  • Run the app again

And it worked

go to your terminal and type the following commands.

  1. Flutter clean
  2. Flutter pub get
  3. now close the app
  4. build the app again hope this works for you. thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM