rharter / auto-value-moshi

AutoValue: Moshi Extension
Apache License 2.0
190 stars 25 forks source link

AutoValue Parcel Extension Error #75

Closed kalaiselvan369 closed 7 years ago

kalaiselvan369 commented 7 years ago

Error:(13, 17) error: Extension com.ryanharter.auto.value.parcel.AutoValueParcelExtension wants to consume a property that does not exist: writeToParcel

Above error occurs when I used both @AutoValue and @MoshiAdapterFactory in single class that also implements parcelable and JsonAdapter.Factory.

Kindly help me.

rharter commented 7 years ago

An AdapterFactory is, by definition, not a value type, nor part of a value type, so it seems weird that you'd also include that. I'd recommend moving that to a separate class (also, unless you only have on @AutoValue class, in which case you don't really need the factory, it would be weird to have the factory in one of your models)

kalaiselvan369 commented 7 years ago

@rharter Understood now. Thanks.