title: Android: Missing Resource in Intermediates Directory (Is Gradle to Blame?)
body: <p><p>I'm very new to both Android Studio and OpenCV so please forgive me if this is a poor question.
  <p>Having downloaded and installed the OpenCV general libraries as well as the OpenCV SDK for Android, I now want to use Android Studio and the Android NDK to compile one of the sample OpenCV projects for use on my Android phone.
  <p>I have followed the instructions on <a href="http://blog.hig.no/gtl/2014/08/28/opencv-and-android-studio/" rel="nofollow">this page</a> but am still running into build errors with gradle. The error output statement is as follows:</p>
  
  <blockquote>
    <p><p>.../AndroidStudioProjects/MyProject/app/build/intermediates/manifests/full/debug/AndroidManifest.xml
    <p>Error:(13, 23) No resource found that matches the given name (at
    'icon' with value '@drawable/ic_launcher'). <p>Error:(15, 24) No resource found that matches the given name (at 'theme' with value '@style/AppTheme').<p>"Execution failed for
    task ':app:ProcessDebugResources'"</p>
  </blockquote>
  
  <p><p>With my very basic understanding, I'm guessing that this means gradle is reading AndroidManifest.xml within the <strong>build/intermediates/manifests/full/debug</strong> directory, and this manifest is referencing resources that do not exist. 
  <p>If this was a directory and an xml file that I had created, I'd be looking to replace the missing resources or edit the manifest. But since all files and directories within the build directory are generated by gradle, I don't have a clue what to do. </p>
  
  <p><p>Why would gradle generate one directory and file (i.e. AndroidManifest.xml), but not another (i.e. the missing resources)?
  <p>My best guess at the source of the problem is that something in the <strong>build.gradle</strong> file that the above link provides doesn't match my particular setup. I've tried tweaking <strong>build.gradle</strong> to use different SDK and buildTools versions but that hasn't helped. 
  <p>I'm running Android Studio 1.0.1 on Mac OSX 10.10.4
  <p>If anyone can point me in the right direction I would really appreciate it.
  <p>
  <p>
  <p><strong>Edit:</strong> This is the text from the main AndroidManifest.xml found in the <strong>app/src/main</strong> directory.</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.baneofsociety.pleasework"&gt;
  
  &lt;application android:allowBackup="true" android:label="@string/app_name"
      android:icon="@drawable/ic_launcher" android:theme="@style/AppTheme"&gt;
  
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><p>Everything in <strong>app/src/main/res</strong> is copied directly from the OpenCV example files, as per the instructions I was following in the link. I did not find a styles.xml under <strong>app/src/main/res/values</strong>, only strings.xml.</p>