创建一个产品SDK:如何添加一个本地库(.SO),并与我创建的SDK罐子? [英] Creating a product SDK: How do I add a native lib (.SO) and a jar with the SDK I am creating?
问题描述
我创建一个小部件,我们将提供给开发者的最终用户,它由一个JAR和机库(* .SO)的使用NDK构建。该JAR具有JNI接口的动态库
这是关于如何将一个项目的外部JAR很清晰但不知道如何包含相关的动态库。
-
我应如何包装起来,并建立.jar和.SO?什么是这里的最佳做法?
-
我可以创建使用JDK的jar命令JAR文件。我需要在瓶子运行dx.bat转换成Dalvik的字节code?
-
我需要创造出行动的小部件的示例项目。我怎么有这个.jar和。所以在演示如何使用控件的示例项目?
我花了一些时间在这,我只是不明白为什么不这样写wikitude文档....反正遵循这一变化!
- 转到Windows / preferences /安卓/建
- 取消的第一和第二个选项
- 在提取文件从wikitudesdk.jar用winrar,就好像它是一个压缩文件,搜索libarchitect.so并将其复制到/库/库/ armeabi /
- 添加wikitudesdk.jar到您的构建路径
I am creating a widget that we will provide to developer end users and it consists of a JAR and a native library (*.SO) built using the NDK. The JAR has a JNI interface to the dynamic library.
It's very clear on how to include an external JAR in a project but not how to include a dependent dynamic library.
How do I package up and build the .JAR and .SO? What are the best practices here?
I can create the JAR file using the JDK's jar command. Do I need to run dx.bat on the jar to convert to Dalvik bytecode?
I need to create a sample project showing the widget in action. How do I include this .JAR and .SO in a sample project that demonstrates how to use the widget?
I spent some time on this, and i just can't understand why isn't this written on wikitude documentation.... anyway follow this changes!
- go to windows/preferences/android/build
- uncheck the first and the second option
- extract files from wikitudesdk.jar with winrar as if it is an archive, search libarchitect.so and copy it in /libs/libs/armeabi/
- add wikitudesdk.jar to your build path
这篇关于创建一个产品SDK:如何添加一个本地库(.SO),并与我创建的SDK罐子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!