Why am I getting an error when trying to save a list in Room database with the help of a type converter?

I want to store a list of Integer type in a Room database. For this I wrote a converter that looks like: public class TypeConverter { static Gson gson = new Gson(); @androidx.room.TypeConverter …