title: Butter Knife won't inject
body: <p>I'm trying to use <a href="http://jakewharton.github.io/butterknife/" rel="nofollow noreferrer">Butter Knife</a> at Android Studio these days, yet it fails me with some odd problems. I used to try Butter Knife at eclipse, and it worked fine. I don't know if I configured something wrong at Android Studio.</p>
  
  <p>I followed instructions at Jake Wharton's <a href="http://jakewharton.github.io/butterknife/" rel="nofollow noreferrer">website</a>, yet it's still not working. At first, It could be compiled and installed, but after <code>Butterknife.inject(this)</code>, the view would still be null, and it threw a null pointer error. Then I googled how to configure Butterknife at Android Studio, and followed <a href="https://stackoverflow.com/questions/21030078/android-studio-0-4-butter-knife">this issue</a> at stackoverflow, it could not pass compilation then.</p>
  
  <p>Then I reverted to my first version of configuration, it also began to fail compilation. Here's the message:</p>
  
  <p><code>Error:(14, 12): @InjectView-annotated class incorrectly in Android framework package. (android.rocky.butterknife_test.MyActivity)</code></p>
  
  <p>and</p>
  
  <p><code>Error:Execution failed for task ':app:compileDebugJava'.
   Compilation failed; see the compiler error output for details.</code></p>
  
  <hr>
  
  <p>This is my configuration of <code>app/build.gradle</code>:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 20
      buildToolsVersion "20.0.0"
  
      defaultConfig {
          applicationId "android.rocky.butterknife_test"
          minSdkVersion 19
          targetSdkVersion 20
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          debug {
              runProguard false
          }
      }
      lintOptions {
          disable 'InvalidPackage'
      }
      packagingOptions {
          exclude 'META-INF/services/javax.annotation.processing.Processor'
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.jakewharton:butterknife:5.1.2'
  }
  </code></pre>
  
  <p>This is my configuration of <code>build.gradle</code> at root:</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.12.+'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          mavenCentral()
      }
  }
  </code></pre>
  
  <p>This is my Java code:</p>
  
  <pre><code>public class MyActivity extends Activity {
    @InjectView(R.id.greeting)
    TextView greetingTextView;
  
    @Override
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_my);
      ButterKnife.inject(this);
      greetingTextView.setText("butter knife!");
    }
  
  
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.my, menu);
      return true;
    }
  
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
      if (id == R.id.action_settings) {
        return true;
      }
      return super.onOptionsItemSelected(item);
    }
  }
  </code></pre>
  
  <p>BTW, my android studio version is 0.8.2. If you think the snippets I paste are all fine, tell me to paste other snippets. Thanks a lot!</p>