包装机库到APK [英] Packaging a native library into an APK
本文介绍了包装机库到APK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何做到这一点从Eclipse的?我找不到任何办法。我试图创建一个的build.xml
与以下内容并添加它作为最后的建设者:
How do I do this from Eclipse? I can't find any way. I tried creating a build.xml
with the following and adding it as the final builder:
<?xml version="1.0" encoding="UTF-8"?>
<project name="MobileRecovery" default="mergelibs">
<loadproperties srcFile="local.properties" />
<property file="ant.properties" />
<loadproperties srcFile="project.properties" />
<fail unless="sdk.dir" message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'" />
<!-- version-tag: custom -->
<import file="${sdk.dir}/tools/ant/build.xml" />
<target name="mergelibs">
<apkbuilder outfolder="bin" verbose="true" apkfilepath="bin/MobileRecovery.apk">
<file path="bin/classes.dex" />
<nativefolder path="libs" />
</apkbuilder>
</target>
</project>
但所有的实现是输出 apkbuilder不支持嵌套的文件元素
。
在这一点上我不感兴趣的我在做什么错误的原因和怎么样了,如果有人可以给我一个解决方案,工程,我会找出其背后的理论。
At this point I'm not interested in the whys and hows of what I'm doing wrong, if someone can just give me a solution that WORKS I'll figure out the theory behind it.
推荐答案
将本机库中的\库\你的项目文件夹的armeabi目录和Eclipse将会把它放在包中。
Place your native library in \libs\armeabi directory of your project folder and Eclipse will put it in the package.
这篇关于包装机库到APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文