如何从 Eclipse 执行此操作?我找不到任何办法。我尝试使用以下内容创建一个build.xml
并将其添加为最终构建器:
<?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 doesn't support the nested "file" element
。
在这一点上,我对我做错的原因和方式不感兴趣,如果有人能给我一个可行的解决方案,我会弄清楚它背后的理论。