-
Notifications
You must be signed in to change notification settings - Fork 5
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
java.lang.IllegalStateException #3
Comments
Can someone help please? |
Hey @safapps Sorry I haven't updated the plugin a while ago, I checked it yesterday and it seems that the API I use for the plugin are deprecated. When I get some free time I'll update it. Cheers. |
Hi @safapps I have updated the library to run on react-native so it should run now on Android >8, you just need to upgrade to the 1.5.0 version, this should do it: npm install [email protected] -s If you need an working example you can use this one... Cheers. |
@cesarvr Thank you very much for this quick response, I will update my project, your library is incredible and very light! |
Hi @cesarvr after upgrading to version 1.5.0 still gave this error when testing on the Android emulator, the interesting thing is that it happens intermittently, most of the time it works correctly, this error in PDF.fromHTML, follow the message mistake: |
Hey @safapps , I think I fix the problem for version 1.6.0, it was an issue was that the plugin was trying to do a lot of work in a thread that doesn't belong to UI rendering. I move those task where it belongs, so now It should work giving those errors/warning messages. |
error: cannot find symbol Hi @cesarvr , I can't test it, my application is breaking when compiling, because my react native version doesn't have androidx, is there any other way to import requiresApi other than androidx? |
That's because I upgraded the library to Androidx, you can do this:
import android.support.annotation.RequiresApi; Or you can upgrade your project to AndroidX and last version of react-native. |
This error is happening in some Androids, it happened to me on Android 8 and Android 10:
The error line follows:
at com.pdf.generator.OffscreenBrowser. (OffscreenBrowser.java:20)
at com.pdf.generator.PDFGenerator.fromHTML (PDFGenerator.java:62)
react-native version 0.59.9
Thanks for the beautiful library
The text was updated successfully, but these errors were encountered: