I recently switched to ButterKnife version 7.0.1 and I keep getting this error. It points to this part of the code:
Here's the exact part of the code:
public class SupportedBanksActivity extends AppCompatActivity {
@Bind(R.id.activity_supported_banks_lv)
ListView mListView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_supported_banks);
ButterKnife.bind(this);
}
}
and the error:
error: cannot find symbol method bind(SupportedBanksActivity)
I don't understand why it says that. I can go into this method of the ButterKnife library and I see that's it's there. I have made the following changes to my code:
build.gradle
lintOptions {
disable 'InvalidPackage'
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
dependencies {
compile 'com.jakewharton:butterknife:7.0.1'
}
proguard-rules.txt
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewBinder { *; }
-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}