Search code examples
androidandroid-studioandroid-annotations

Android annotation upgrade to 4.0.0 build error


After I update android annotation library version to 4.0.0 from 3.0+, I cannot build the application. My project can build successfully with android annotation 3.0+ but cannot with 4.0.0. When I check the android annotation log file, it show the following errors repeatly(8 times).

11:57:33.458 [Daemon worker Thread 5] ERROR o.a.i.p.ModelValidator:74 - Unrecognized type. Please let your attribute be primitive or implement Serializable or Parcelable or an annotated Parceler bean.
11:57:33.459 [Daemon worker Thread 5] WARN  o.a.i.p.ModelValidator:85 - Element selectedContacts invalidated by ExtraHandler

All generated files from android annotation cannot generate because of this error, so, I could not manage to find the source of error. Could you please suggest me about what can be the source of this error?

Thanks.


Solution

  • Check the selectedContacts field. It has an @Extra annotation, but the type of the field is not correct for that annotation.