Closed bawahakim closed 3 weeks ago
Update: easily fixed the JNI not found issue. The reason was that JAVA_HOME
pointed to Android Studio version of Java, which does not seem to support JNI. Installing JDK 17 and pointing JAVA_HOME
to it resolved the issue.
First of all, sorry if this is the wrong place to report. I've seen the issue in Stack Overflow, but it only seems to apply to Android builds.
Background I do not use JNI directly, it's been used through a dependency of
native_dio_adapter
. We only need that package for Android and iOS. I can build on Android fine from my Windows machine when the package is added.However, if i try to build for Windows, the build fails with the error below
I am faced with two options:
In the first case, it would mean any developper would need to (unecessarily) follow steps to fix the missing env vars on their system. So I'd think the second option would be best.
However, there is no way as I understand to disable the plugin for Windows, except creating a fork and explictly removing windows for the
ffiPlugin
definition in the pubspec.Is there any other way to disable the plugin, or should I just rely on a fork?
Thank you!