Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build project depending on native_pdf_renderer with Flutter 3 #298

Open
ethael opened this issue May 17, 2022 · 12 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@ethael
Copy link

ethael commented May 17, 2022

Buiild error output:

NativePdfRendererPlugin.kt: (124, 29): Type mismatch: inferred type is String? but String was expected
NativePdfRendererPlugin.kt: (138, 25): Type mismatch: inferred type is String? but String was expected
FAILURE: Build failed with an exception.

Flutter doctor:
[✓] Flutter (Channel stable, 3.0.0, on Gentoo/Linux 5.16.10-gentoo-dist, locale en_US.utf8)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

@mato7511
Copy link

i'm running into same issue

@MartinHlavna
Copy link

I am also blocked by this issue.

@JurajMlich
Copy link

Blocked by this issue as well :(

@matejhocevar
Copy link

Same here, I needed to revert the whole upgrade. Let me know if there is something that I can help with.

@tim-isonsolutions
Copy link

My build is broken as well.

Can you provide at least a "ballpark" ETA so we can plan our road forward. Thanks!!

@tim-isonsolutions
Copy link

Switching to pdfx solved the issue. Thanks

@Caeruleo
Copy link

Caeruleo commented Jun 6, 2022

I'm using pdfx and still having this bug 😅

@griff88
Copy link

griff88 commented Jun 6, 2022

Having the same issue as well... Adding pdfx does not work either

@Caeruleo
Copy link

Caeruleo commented Jun 7, 2022

I discovered that in my case the problem was that I use a library that has as transitive dependency and old version of native_pdf_renderer (4.X.X) https://pub.dev/packages/thumbnailer.
Adding

native_pdf_renderer: ^5.0.0+1 
 pdfx: ^2.0.1+2

on dependency_overrides fixed my problem, it seems a bit risky but everything seems to work fine.
Last versions of native_pdf_renderer and pdfx seems to be able to compile fine with flutter 3, check if you've any transitive dependency that uses an older one. I searched for the old dependency on the pubspec.lock and then I used flutter pub deps to see the dependency graph.

Hope it helps anyone.

@ethael
Copy link
Author

ethael commented Jun 7, 2022

@Caeruleo FYI: https://github.com/4Q-s-r-o/thumbnailer today released new version with updated dependencies.

@hydev777
Copy link

I am having the same issue, I have not the package in my dependencies however some package is using it and is blocking the Android app from running...

@hydev777
Copy link

The problem has been solved, the dependency thumbnailer was using an old version (version 4) of native_pdf_renderer as mentioned by @Caeruleo, so we find out we were not using that package and proceed to deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants