title: Android Studio can't find existing resource
body: <p>Since Google recently announced that Android Studio is the official IDE for Android developement I decided to change my work environment from the Eclipse IDE to Android Studio. </p>
  
  <p>After importing the project to Android Studio I've come across a strange error. 
  The error says that it can't find two existing R.drawables in an array of R.drawables, the resources are two png pictures. </p>
  
  <p>Here is the syntax of the array: </p>
  
  <pre><code>flag = new int[] {R.drawable.thegodfather,R.drawable.thegeneral,R.drawable.kingofcomedy,
   R.drawable.drstrangelove,R.drawable.thebiglebowski}
  </code></pre>
  
  <p>The two R.drawables that is causing the error are thegodfather and kingofcomedy. </p>
  
  <p>Here is the error messages: 
  (1)</p>
  
  <pre><code>&gt;     Error:(101, 32) error: cannot find symbol variable thegodfather
  &gt;     Error:(101, 78) error: cannot find symbol variable kingofcomedy
  &gt;     Note: Some input files use or override a deprecated API.
  &gt;     Note: Recompile with -Xlint:deprecation for details.
  &gt;     Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
  &gt;     &gt; Compilation failed; see the compiler error output for details.
  </code></pre>
  
  <p>(2)</p>
  
  <pre><code>/Users/rawandsultani/Documents/ANDROID/V1/v11/app/src/main/java/com/exple/top100/Top100Activity.java:101: error: cannot find symbol
              flag = new int[] {R.drawable.thegodfather,R.drawable.thegeneral,R.drawable.kingofcomedy,
                                          ^
    symbol:   variable thegodfather
    location: class drawable
  /Users/rawandsultani/Documents/ANDROID/V1/v11/app/src/main/java/com/exple/top100/Top100Activity.java:101: error: cannot find symbol
              flag = new int[] {R.drawable.thegodfather,R.drawable.thegeneral,R.drawable.kingofcomedy,
                                                                                        ^
    symbol:   variable kingofcomedy
    location: class drawable
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  2 errors
  
   FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:compileDebugJavaWithJavac'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  </code></pre>
  
  <p>After countless efforts of cleansings, rebuildings, invertings and restarts the same error still exists. I have checked that the resource is actually there and I have deleted and replaced it just to be sure. It still doesn't work. </p>
  
  <p>What is causing Android Studio to ignore theese two resources? </p>
  
  <p>Here is the beginning of my Android-manifest file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.exple.v1"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="11"
          android:targetSdkVersion="23" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme"
          &gt;
  </code></pre>
  
  <p>And here is my Gradle.build : </p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.1"
  
      defaultConfig {
          applicationId "com.exple.v1"
          minSdkVersion 11
          targetSdkVersion 23
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_7
          targetCompatibility JavaVersion.VERSION_1_7
      }
  }
  
  dependencies {
      compile 'com.android.support:appcompat-v7:23.0.1'
      compile 'com.android.support:appcompat-v7:23.0.1'
      compile 'com.android.support:support-v4:23.0.1'
  }
  </code></pre>
  
  <p>Again, I have no clue what is causing this problem. After searching on Stack I've found out that some have had a similiar problem but solved it by cleaning the project or restarting Android Studio which has not worked out for me. </p>
  
  <p>The manifest file and the Gradle.build is for extra information 
  just in case anyone need a look at it. </p>