title: How can I use multiple -S values with aapt without using <add-resource>?
body: <p>I am trying to build R.java by using aapt from the command line. I am specifying multiple <code>-S</code> directories because I have multiple <code>res</code> directories. I am building by using:</p>
  
  <pre><code>aapt package \
    -M AndroidManifest.xml \
    -m -J gen \
    -S src/com/example/res \
    -S src/com/example/ui/res
  </code></pre>
  
  <p>Unfortunately, I am getting the following error:</p>
  
  <pre><code>src/com/example/ui/res/values/strings.xml:2: error: Resource at app1_name appears in overlay but not in the base package; use &lt;add-resource&gt; to add.
  </code></pre>
  
  <p>Currently, <code>src/com/example/ui/res/values/strings.xml</code> contains the following:</p>
  
  <pre><code>&lt;resources&gt;
      &lt;string name="app1_name"&gt;MyAppName&lt;/string&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>I would prefer not to have to change this to:</p>
  
  <pre><code>&lt;resources&gt;
      &lt;add-resource type="string" name="app1_name"&gt;MyAppName&lt;/add-resource&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>(This was suggested on <a href="https://groups.google.com/forum/?fromgroups#!topic/android-porting/bYfeLEjERjg" rel="noreferrer">https://groups.google.com/forum/?fromgroups#!topic/android-porting/bYfeLEjERjg</a>, though it does not even seem to solve my problem.)</p>
  
  <p>Am I misguided in my expectation of how the <code>-S</code> argument should work?</p>
  
  <p>The only workaround I can think of is to symlink all of my <code>-S</code> directories as subdirectories of the root <code>res</code> directory and to specify <code>res</code> as the only <code>-S</code> directory.</p>