我需要找到一种方法来保存一个HashMap字符串以保存在我的SQLite数据库中以便在以后的阶段进行检索.
这是我的HashMap:
private Map<String, Bitmap> myMarkersHash new HashMap<String, Bitmap>();
Run Code Online (Sandbox Code Playgroud)
然后保存到SQlite数据库时:
contentValues.put(LocationsDB.FIELD_HASH, myMarkersHash);
Run Code Online (Sandbox Code Playgroud)
但问题是,在我得到一个错误put,在contentValues.put与此错误:
The method put(String, String) in the type ContentValues is not applicable for the arguments (String, Map<String,Bitmap>)
Run Code Online (Sandbox Code Playgroud)
所以我的问题是如何将其转换为字符串,以便我可以将其保存到我的sqlite数据库?
谢谢