1

I don't know why I'm having this warning:

W/Firestore: (24.1.2) [CustomClassMapper]: No setter/field for about found on class

Article Data Class:

data class Article(
    var img: String = "",
    var scientificName: String = ""
)

My Cloud Firestore:

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
micinable
  • 11
  • 2

1 Answers1

1

As the error messages says, you have a field named about in your document and there is no corresponding property in your Article class. You'll need to either add the missing property to your Article class, or mark the class with the IgnoreExtraProperties annotation so that the mapper will ignore the field when reading the Article object from the document as shown here.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • ohh okay i get it, thank you so much. I wanna ask, how to retrieve image from firestore ? thank in advance – micinable Jun 11 '22 at 00:47
  • That seems like a different question @AdeAdamNisaSabrina, so I recommend posting it in a separate question preferably with a [minimal repro](http://stackoverflow.com/help/mcve) of what you already tried and where you got stuck. – Frank van Puffelen Jun 11 '22 at 12:47