You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can install my dynamic library libopus.so into my Flutter project by placing it in the android/src/main/jniLibs/arm64-v8a folder. That works fine and DynamicLibrary.open() finds it.
However, if I try to use a static library, "libopus.a" that fails.
Where do I put the ".a" file on Android? And how do I lookup the symbol?
This is the Dart/Flutter code I am using:
final DynamicLibrary lib_opus_native = DynamicLibrary.process(); // This fails on symbol lookup
//final DynamicLibrary lib_opus_native = DynamicLibrary.open("libopus.a"); // This fails immediately
//final DynamicLibrary lib_opus_native = DynamicLibrary.open("libopus.so"); // This succeeds but is pulling in dynamic not static
final int Function(int channels) opus_encoder_get_size = lib_opus_native
.lookup<NativeFunction<Int32 Function(Int32)>>("opus_encoder_get_size")
.asFunction(); // This worked for the dynamic library
Thanks.
The text was updated successfully, but these errors were encountered:
Hi @buzmeg
It seems you are asking for assistance on personal code. Please see https://flutter.dev/community for resources and asking questions like this,
you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you
And, having already looked rather extensively through both Google and StackOverflow, it seems like nobody who asked this question actually got any solution.
At minimum, this is a documentation fault. At maximum, this can't be done and is a genuine bug.
I know that I certainly don't have enough knowledge about Flutter to determine which category this falls into.
So, I'd at least like this issue to stay open until we determine this much.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
I can install my dynamic library libopus.so into my Flutter project by placing it in the android/src/main/jniLibs/arm64-v8a folder. That works fine and DynamicLibrary.open() finds it.
However, if I try to use a static library, "libopus.a" that fails.
Where do I put the ".a" file on Android? And how do I lookup the symbol?
This is the Dart/Flutter code I am using:
Thanks.
The text was updated successfully, but these errors were encountered: