<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aapt on bramp.net</title>
    <link>https://blog.bramp.net/</link>
    <description>Recent content in Aapt on bramp.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-GB</language>
    <lastBuildDate>Sun, 23 May 2010 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.bramp.net/tags/aapt/" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Android Linux SDK revision 6 aapt library bug</title>
      <link>https://blog.bramp.net/post/2010/05/23/android-linux-sdk-revision-6-aapt-library-bug/</link>
      <pubDate>Sun, 23 May 2010 00:00:00 +0000</pubDate>
      
      <guid>https://blog.bramp.net/post/2010/05/23/android-linux-sdk-revision-6-aapt-library-bug/</guid>
      <description><p><strong>UPDATE – I <a href="http://code.google.com/p/android/issues/detail?id=8498">reported this bug</a> and it was promptly fixed the next day. Read the <a href="http://code.google.com/p/android/issues/detail?id=8498">bug report</a> for solution on how to fix.</strong></p>
<p><a href="http://android-developers.blogspot.com/2010/05/android-22-and-developers-goodies.html">Android 2.2</a> just came out and along with it came a updated set of <a href="http://developer.android.com/sdk/tools-notes.html">SDK tools</a>. I’ve been using these tools on Windows, but today I took my Linux laptop out and I’ve been sat in a <a href="http://www.juicafe.co.uk/">coffee shop</a> hyped up on caffeine but completely unproductive because I’m going round in circles with what I think is a bug.</p>
<p>So, I’m trying the <a href="http://developer.android.com/guide/developing/other-ide.html#libraryProject">new library feature</a>, where you can have a Android library project, which is referenced by one or more Android projects. This allows multiple projects to easily share the same code. The problem is when I set-up my Android project to use a library project I get the following error printed in my eclipse console:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">ERROR: Unknown option &#39;--auto-add-overlay&#39;
</span></span><span class="line"><span class="cl">Android Asset Packaging Tool
</span></span></code></pre></div><p>and the code fails to compile. If I remove the reference to the library project this error goes away.</p>
<p>The error is coming from the aapt command, which seems to be installed multiple times, once for each SDK version:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ locate -r <span class="s2">&#34;aapt</span>$<span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">/home/bramp/android-sdk-linux_86/platforms/android-3/tools/aapt
</span></span><span class="line"><span class="cl">/home/bramp/android-sdk-linux_86/platforms/android-4/tools/aapt
</span></span><span class="line"><span class="cl">/home/bramp/android-sdk-linux_86/platforms/android-7/tools/aapt
</span></span><span class="line"><span class="cl">/home/bramp/android-sdk-linux_86/platforms/android-8/tools/aapt
</span></span></code></pre></div><p>Checking each command I see that only versions 7 and 8 have the <em>–auto-add-overlay</em> option. Both my library and main projects are targeted at Android 1.6 (i.e. android-4). I tried re-targeting my main project to Android 2.2 (i.e. android-8) and the problem seems to go away.</p>
<p>So for the moment this seems an annoyance, but I can live with it by setting my target to 2.2. Hopefully Google will release a fix so I can still use the older targets with the new library feature.</p>
<p><strong>Just a quick update:</strong><br>
I noticed that on Windows all versions of the aapt tool support the ‘–auto-add-overlay’ option. So what I suspect has happened is that someone forgot to update the aapt binary for the old platforms.</p>
</description>
    </item>
    
  </channel>
</rss>
