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