title: XML not found in android module
body: <p>I am configuring my android application for <a href="https://developer.android.com/guide/playcore/feature-delivery/on-demand" rel="nofollow noreferrer">on demand delivery</a>.
  The app uses <a href="https://developer.android.com/guide/topics/admin/device-admin" rel="nofollow noreferrer">Device Administrator API</a> which I am trying to break down in separate module. Now the application have <code>app module</code> and <code>admin module</code></p>
  <p>Device Administrator requires a xml file which list the admin polices that app would like to use. When this xml file is moved to admin module (admin/res/xml/device_admin_policies.xml) android studio generates following android resource linking error</p>
  <blockquote>
  <p>ERROR:...\app\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:376: AAPT: error: resource xml/device_admin_policies (aka com.app.package:xml/device_admin_policies) not found.</p>
  </blockquote>
  <p>Do note that the error is coming in merged manifest generate at compile time. If I move back this file to app module it works.</p>
  <p>I am experimenting something with Device Admin API and for that I need this xml file to be in admin module. I am not sure if its possible to point it somehow to get the file from admin module.</p>
  <p><strong>Admin Module Manifest</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:dist=&quot;http://schemas.android.com/apk/distribution&quot;
      package=&quot;com.app.package.ad&quot;&gt;
  
      &lt;dist:module
          dist:instant=&quot;false&quot;
          dist:title=&quot;@string/title_lock&quot;&gt;
          &lt;dist:delivery&gt;
              &lt;dist:install-time /&gt;
          &lt;/dist:delivery&gt;
  
          &lt;dist:fusing dist:include=&quot;false&quot; /&gt;
      &lt;/dist:module&gt;
  
      &lt;application android:hasCode=&quot;true&quot;&gt;
          &lt;activity
              android:name=&quot;.MainActivity&quot;
              android:exported=&quot;false&quot; /&gt;
  
          &lt;activity android:name=&quot;.AdminPermissionActivity&quot; /&gt;
  
          &lt;receiver
              android:name=&quot;.admin.DeviceAdministrator&quot;
              android:permission=&quot;android.permission.BIND_DEVICE_ADMIN&quot;
              android:exported=&quot;false&quot;&gt;
              &lt;meta-data
                  android:name=&quot;android.app.device_admin&quot;
                  android:resource=&quot;@xml/device_admin_policies&quot; /&gt;
  
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.app.action.DEVICE_ADMIN_ENABLED&quot; /&gt;
                  &lt;action android:name=&quot;android.app.action.DEVICE_ADMIN_DISABLED&quot; /&gt;
                  &lt;action android:name=&quot;android.app.action.ACTION_PASSWORD_FAILED&quot; /&gt;
                  &lt;action android:name=&quot;android.app.action.ACTION_PASSWORD_SUCCEED&quot; /&gt;
                  &lt;action android:name=&quot;android.intent.action.USER_PRESENT&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  <p><strong>xml file (device_admin_policies.xml)</strong></p>
  <pre><code>&lt;device-admin xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      &lt;uses-policies&gt;
          &lt;force-lock /&gt;
          &lt;disable-keyguard-features /&gt;
          &lt;watch-login /&gt;
      &lt;/uses-policies&gt;
  &lt;/device-admin&gt;
  </code></pre>