Some controls view click events are not valid after confusing project code with afinal annotations

Source: Internet
Author: User

A recent project went live, requiring code confusion, confusing the click events of certain controls, and later found to be a afinal annotation issue. After a half-day of data, and then asked the afinal of the relevant personnel, they gave the solution is to eliminate confusion of the annotated class, so that means that basic all the activity and fragment can not be confused, this is not what I want.

Later, the anti-compilation code compared to exclude the annotated class and do not exclude the difference between the annotated class, the comparison found that those who can not click on the definition of the control code is optimized, the reason for the optimization is because after the annotation, in the code of the control's instance is not used elsewhere, so the program thought that the code is not used, it was

Know the problem that solution is, add-dontshrink in the confusion configuration, so that the code is not compressed optimization, plus it found that after the confusion of the code has not increased much, if you mind that can only exclude the annotated class or no longer use afinal annotations.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Some controls view click events are not valid after confusing project code with afinal annotations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.