如何包括Android原生扩展(的.so)为AIR本机扩展(.ane)? [英] How to include a android native extension (.so) into an AIR native extension (.ane)?

查看:215
本文介绍了如何包括Android原生扩展(的.so)为AIR本机扩展(.ane)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在试图找到一个解决方案,让AIR本机扩展,包括C - 库为Android正在使用JNI

I'm currently trying to find a solution to have an AIR native extension including a C - library for Android that is using JNI.

到目前为止,我试图收拾。所以lib放到一个罐子里,然后被打包成烷。 当我了解这里,我一定要解开。所以从第一次为了将.jar访问它。

So far, I tried to pack the .so lib into a jar, which then is packaged into the ane. As I learned here, I have to unpack the .so from the .jar first in order to access it.

的code在那里发现似乎是工作为一个常规机器人工程,不幸的是要的.jar,然后包装到.ane这样做时,它似乎失去范围,导致

The code found there seems to be working for a regular android project, unfortunatly when doing this for a .jar which is then packaged into an .ane, it seems to lose scope, resulting in a

FileNotFoundException: File path/to/my/lib was not found inside JAR

我已经双重和三重检查所有的路径和我罐子的内容。这是所有有和拼写正确。

I already double and triple checked all paths and the contents of my jar. It's all there and spelled correctly.

Q1:如何获得访问。所以从动作

Q1: How do I get access to the .so from actionscript?

Q2:是否有包装/解决。所以除了常规的扩展-JAR到ANE

Q2: Is there any other way to package/address the .so besides the regular extension-jar into the ane?

Q3:我真的不知道很多有关.ane机制的内部工作。是不是也可以跳过该.jar环绕,并直接从ActionScript使用的.so?

Q3: I really don't know much about the inner working of the .ane mechanism. Is it also possible to skip the .jar-wrapping and use the .so directly from actionscript?

和往常一样,非常感谢任何输入。

As always, many thanks for any input.

推荐答案

它成为了我的一个坏习惯,回答我自己的问题,但无论如何...

It becomes a bad habit of me to answer my own questions, but anyway...

有时候文档可以提供帮助。 这里在Adobe的文档我终于找到了解决办法。

Sometimes the docs can help. Here in the adobe docs I finally found the solution.

简单地复制。所以在我的ANE包目录库/ armeabi-V7A文件夹中包含的lib到姊,这样我就可以用了。所以从我内扩展了Java code

Simply copying the .so to the libs/armeabi-v7a folder in my ane package directory includes the lib into the ane, so I can use the .so from inside the java code of my extension.

抱歉打扰。

这篇关于如何包括Android原生扩展(的.so)为AIR本机扩展(.ane)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆