Butterknife: error: @BindView-annotated class incorrectly in Android framework package. (android.example.notes20.LoginActivity) TextView textTitle;

Created on 24 Mar 2020  路  3Comments  路  Source: JakeWharton/butterknife

package android.example.notes20;

import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class LoginActivity extends AppCompatActivity {

@BindView(R.id.text_title)
TextView textTitle;
@BindView(R.id.email)
EditText email;
@BindView(R.id.password)
EditText password;
@BindView(R.id.text_signup)
TextView textSignup;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    ButterKnife.bind(this);


}

@OnClick(R.id.text_signup)
public void onClick() {
}

}

gradle--
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
buildToolsVersion "29.0.2"

defaultConfig {
    applicationId "android.example.notes20"
    minSdkVersion 19
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"
    //jetifier.blacklist= butterknife-compiler
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'

}

I'm unable to solve this error

Most helpful comment

You cannot use android.* as a package. Change it to com.example.* or example.android.* or anything but "android" as the root package.

GOT IT !!!!

All 3 comments

You cannot use android.* as a package. Change it to com.example.* or example.android.* or anything but "android" as the root package.

You cannot use android.* as a package. Change it to com.example.* or example.android.* or anything but "android" as the root package.

GOT IT !!!!

@JakeWharton thank you very much,

Was this page helpful?
0 / 5 - 0 ratings