title: Android build success but cannot resolve R
body: <p>help me, my Android cannot resolve symbol R( the R becomes red color) but when i try to build project, it succeed. anybody know why ? i already try clean project, rebuild project, sync project with gradle files and also invalidate cache and restart but still cannot resolve R <a href="https://i.stack.imgur.com/fMEyu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fMEyu.png" alt=""></a></p>
  
  <p>here is my gradle (app):</p>
  
  <pre><code>apply plugin: 'com.android.application'
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.justinjunias.stockitem"
          minSdkVersion 24
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  apply plugin: 'com.google.gms.google-services'
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      // Butterknife
      implementation 'com.jakewharton:butterknife:8.6.0'
      annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
  
      //Design
      implementation 'com.android.support:design:28.0.0'
      //Volley
      implementation 'com.android.volley:volley:1.1.1'
      //Firebase
      implementation 'com.google.firebase:firebase-core:16.0.8'
      implementation 'com.google.firebase:firebase-database:16.0.6'
      implementation 'com.google.firebase:firebase-auth:16.2.0'
      implementation 'com.google.firebase:firebase-firestore:18.1.0'
  }
  </code></pre>
  
  <p>And my gradle build: </p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
  
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.3.2'
          //Firebase
          classpath 'com.google.gms:google-services:4.2.0'
  
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>