title: Packaging a native library into an APK
body: <p>How do I do this from Eclipse? I can't find any way. I tried creating a <code>build.xml</code> with the following and adding it as the final builder:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project name="MobileRecovery" default="mergelibs"&gt;
  &lt;loadproperties srcFile="local.properties" /&gt;
  &lt;property file="ant.properties" /&gt;
  &lt;loadproperties srcFile="project.properties" /&gt;
  &lt;fail unless="sdk.dir" message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'" /&gt;
  &lt;!-- version-tag: custom --&gt;
  &lt;import file="${sdk.dir}/tools/ant/build.xml" /&gt;
  &lt;target name="mergelibs"&gt;
      &lt;apkbuilder outfolder="bin" verbose="true" apkfilepath="bin/MobileRecovery.apk"&gt;
          &lt;file path="bin/classes.dex" /&gt;
          &lt;nativefolder path="libs" /&gt;
      &lt;/apkbuilder&gt;
  &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>but all that achieves is the output <code>apkbuilder doesn't support the nested "file" element</code>.</p>
  
  <p>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.</p>