title: Android Studio can't find an existing symbol
body: <p>I've recently decided to change my work environment from Eclipse 
  to Android Studio. I decided to import my Eclipse project through Android Studio. </p>
  
  <p>Problem is, when I compile my code, I come across 2 errors which says that it cannot find two existing symbols. These symbols are in fact two png pictures which are saved in res &lt; drawable &lt; hdpi. Still, the program can't locate just these two pictures. I have a bunch of other pictures which works perfectly in the same folder. I have controlled this by removing the two pictures causing me the errors and tested the app with successful results.  </p>
  
  <p>Here is the entire error message: </p>
  
  <p>(1)</p>
  
  <pre><code>Error:(101, 32) error: cannot find symbol variable thegodfather
  Error:(101, 78) error: cannot find symbol variable kingofcomedy
  Note: Some input files use or override a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
  &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>(3) </p>
  
  <pre><code>Gradle sync failed: Could not find com.android.tools.build:gradle:23.0.0.
           Searched in the following locations:
           file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/23.0.0/gradle-23.0.0.pom
           file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/23.0.0/gradle-23.0.0.jar
           https://jcenter.bintray.com/com/android/tools/build/gradle/23.0.0/gradle-23.0.0.pom
           https://jcenter.bintray.com/com/android/tools/build/gradle/23.0.0/gradle-23.0.0.jar
           Required by:
           :v11:unspecified
           Consult IDE log for more details (Help | Show Log)
  </code></pre>
  
  <p>The pictures are saved in an array and here's the array: </p>
  
  <pre><code>flag = new int[] {R.drawable.thegodfather,R.drawable.thegeneral,R.drawable.kingofcomedy,
                       R.drawable.drstrangelove}
  </code></pre>
  
  <p>The two R.drawables which aren't working are .thegodfather and .kingofcomedy. </p>
  
  <p>I have checked that the resources actually exists, and even removed and replaced them, without any luck. </p>
  
  <p>I have looked around Stack to find an answer and found many similar problems but those one's were solved by either cleaning the project, invalidating and restarting or rebuilding or even restarting the program. None of these have worked for me. </p>
  
  <p>Here is my gradle.build code: </p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.1"
  
  
      defaultConfig {
          applicationId "com.exple.v1"
          minSdkVersion 15
          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 fileTree(dir: 'libs', include: ['*.jar'])
  
  }
  </code></pre>
  
  <p>And here is the beginning of my manifest file just in case anyone needs to have a look at it: </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="15"
          android:targetSdkVersion="23" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme"
          &gt;
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/app_name" 
              android:screenOrientation="portrait"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity
  </code></pre>
  
  <p>After looking around a bit, I think I've found my <a href="https://code.google.com/p/android/issues/detail?id=64887#c13" rel="nofollow">problem</a> but I'm not sure where to Implement the solution code, which is in the link if you click on it. Is it the upper or lower gradle build ?</p>