Use Otto Alarm in Android

Source: Internet
Author: User

Today, using the Android annotations on Android Studio1.3.2 and using Otto, I found that I always reported a warning when subscribing to an event.

The configuration is as follows:

1 apt "org.androidannotations:androidannotations: $AAVersion" 2 compile "Org.androidannotations:androidannotations-api: $AAVersion" 3 Compile "Com.squareup:otto: $OttoVersion"

Otto version number: 1.3.8,AA version number: 3.3.2,otto part of the code is as follows:

@EBean (scope = EBean.Scope.Singleton)publicclassextends  Bus {}
The event release code is as follows: @Bean Eventbus bus;  PublicSystemtaskcardview (Context context) {Super(context); } @Click (R.ID.TASKCARD_BTN1)voidBtn1onclick () {Bus.post (Newcommonbuttonevent (R.ID.TASKCARD_BTN1)); } @Click (R.ID.TASKCARD_BTN2)voidBtn2onclick () {Bus.post (Newcommonbuttonevent (R.ID.TASKCARD_BTN2)); } @Click (R.ID.TASKCARD_BTN3)voidBtn3onclick () {Bus.post (Newcommonbuttonevent (R.ID.TASKCARD_BTN3)); }
Subscribe as follows    :    @Subscribepublicvoid  Oncommonbutton (commonbuttonevent event) {    }
the warning error of the report is as follows: Error: (121, 17) Warning: Element Subscribehandler unvalidated by

Use Otto Alarm in Android

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.