android - Couchbase Cannot Write Document to Database -


i newbie on android , trying store image database using couchbase mobile. when try run code logcat outputs error "cannot write database.the current winning revision not deleted, conflict". don't know doing wrong. appreciated. here code.

        document document = database.getdocument("test1");         map<string, object> doccontent = new hashmap<>();         doccontent.put("message", "hello couchbase lite");         doccontent.put("creationdate", currenttimestring);         doccontent.put("testing message 1","testing sync of message");         try {             document.putproperties(doccontent);             unsavedrevision newrev = document.createrevision();             url url = new url("res/mipmap-mdpi-v4/sym_def_app_icon.png");             newrev.setattachment("photo.png", "image/png", url);             newrev.save();             log.d (tag, "document written database named " + dbname + " id = " + document.getid());             }          catch (couchbaseliteexception e) {             log.e(tag, "cannot write document database", e);             }         catch (malformedurlexception e) {             e.printstacktrace();         } 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -