Haris Mujianto
Haris Mujianto

Reputation: 1

Type mismatch: inferred type is ArrayList

Type mismatch: inferred type is ArrayList<com.hariscm.ngobrolind.db.data.Message> but ArrayList<hariscmtham.letschat.db.data.Message!>! was expected

Upvotes: 0

Views: 553

Answers (2)

Amir hossein bagheri
Amir hossein bagheri

Reputation: 43

According to error message, one of the Message data structure imported from com.hariscm.ngobrolind.db.data.Message but another one imported from hariscmtham.letschat.db.data.Message. Make sure both of them imported from the same package. If that didn't resolve the issue, check nullability of your ArrayList.

Upvotes: 1

Notron
Notron

Reputation: 131

I would suggest to look at the imports of the class, make sure you have imported Message class from com.hariscm.ngobrolind.db.data.Message.

Upvotes: 0

Related Questions