-
Notifications
You must be signed in to change notification settings - Fork 68
[jnigen] Fixed an issue with how java.io.File is created #2196
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
@@ -10,6 +10,7 @@ On a Linux machine, following commands can be used to run the example applicatio | |||
cd .. ## From this folder | |||
dart run jnigen --config jnigen.yaml ## Downloads PDFBox JARs and generates bindings. | |||
cd example/ | |||
dart run jni:setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not actually required for the Flutter example at /example
but is for the Dart-standalone example at /dart_example
and the readme there already has it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running from IDE wouldn't require it, but running the built executable requires them. Please correct me if I'm wrong. Thanks. If it's too much, I will remove the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, not sure what you mean by running it from IDE. Flutter Linux build has a CMake that does the job of jni:setup making it unnecessary.
Yeah I would remove this line.
@@ -67,8 +67,6 @@ class PDFInfoAppState extends State<PDFInfoApp> { | |||
final isDir = (await item.stat()).type == FileSystemEntityType.directory; | |||
if (item.path.endsWith('.pdf') && !isDir) { | |||
pdfs.add(item.path); | |||
} else if (isDir) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the example app shows all of directories even if the app aims to show the summary of pdf files found in $HOME directory. I thought better to exclude directories and included only pdf files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't created this example so I don't know what has been the purpose of this. I'm fine with not removing these lines as it doesn't make the example non-functional.
Feel free to open another PR that deletes this line (and cleans the unused variables as a result of your change) that explains why you are making this change. I'd rather this PR remains focused on solving the bug that you fixed.
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Unable to locate the helper library.
dart run jni:setup
at the example app is requiredREADME.md
updatedflutter: Unsupported operation: cannot convert String to jvalue
The issue
Fixed and tested with a sample pdf that has a title.