【发布时间】:2021-03-09 23:36:26
【问题描述】:
我正在为 Flutter 编写 uber h3 插件。我有可用的源代码,但在更精确地创建包时遇到问题我在捆绑 libh3.so 时遇到问题
快速概览:
- 有uber h3 c源代码下载。
download_deps.sh - 那么 android/build.gradle 有构建命令
externalNativeBuild {
cmake {
path "../ios/CMakeLists.txt"
}
}
- 那么 example/lib/main.dart 有一些初始化代码。
initializeH3((String name) => Platform.isAndroid
? DynamicLibrary.open("lib${name}.so")
: DynamicLibrary.process());
但是当我尝试构建它时,找不到库文件。 -我尝试了不同的位置。 似乎库本机 .so 没有捆绑到应用程序中
但我不知道为什么
根据教程https://flutter.dev/docs/development/platform-integration/c-interop 它应该捆绑在一起。
【问题讨论】: