-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnClick method is not work when used the R2.id.xxx. #1612
Comments
Can you provide a sample that reproduces the issue? What does the generated code look like? |
We did not know how to reproduces the issue, but we received feedback from our customers several times. And our QA faced it today, I had debugged it, it seems like the The generated code is `public class NavigationBar_ViewBinding implements Unbinder { private View view7f0b0080; private View view7f0b0085; private View view7f0b0054; @UiThread @UiThread
} @OverRide
} |
Maybe the same problem with #1511 , |
We saw this too, kapt stubs in some cases inlined the constant value rather than the qualified reference, seemingly only on the OnClick-annotated methods. Was a good forcing function to move to listeners in preparation for viewbinding @butterknife.BindView(value = com.Slack.R2.id.toolbar)
public androidx.appcompat.widget.Toolbar toolbarNewName3;
@butterknife.OnClick(value = {5496})
public final void onSendMagicLinkClicked() {
} |
butterKnifePlugin--10.1.0
Gradle 3.4.2
We found that we did not know what circumstances would cause this problem, but we did encounter it several times. Once encountered, only killing the process will return to normal.
just like:
@OnClick(R2.id.tv_close) public void onViewClicked() { onBackPressed(); }
The text was updated successfully, but these errors were encountered: