Home > Enterprise >  Type mismatch: inferred type is ArrayList
Type mismatch: inferred type is ArrayList

Time:06-09

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

CodePudding user response:

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.

CodePudding user response:

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.

  • Related