The method put(String, String) in the type ContentValues is not applicable for the arguments (String, Byte[])
我在使用ContentValues的时候,遇到上面的问题。我看API里面ContentValue里面是可以put进去 Byte[]类型的啊?
ContentValues values = new ContentValues();
values.put("image", img.getImageData().toString());
values.put("name", img.getName());
values.put("decription", img.getDescription());
values.put("image", img.getImageData());
private Byte[] imageData;
public Byte[] getImageData() {
return imageData;
}
public void setImageData(Byte[] imageData) {
this.imageData = imageData;
}
请问各位大侠,这是什么原因呢?
------解决方案--------------------
private byte[] imageData;
public byte[] getImageData() {
return imageData;
}
public void setImageData(byte[] imageData) {
this.imageData = imageData;
}