String Lience=chepai_short.gettext (). ToString () +chepai_number.gettext (). ToString (); Openmap.put ("Lience", Lience.tostring ()); Openmap.put ("UserName", Tv_username.gettext (). toString ()); Openmap.put ("Cardtype", Tv_cardtype.gettext (). toString ()); Openmap.put ("Inoutname", Tv_inrk.gettext (). toString ()); Openmap.put ("Inoperatorcard", SwitchActivity.username.toString ()); Switchactivity.username//jsonpost_mode mode=new Jsonpost_mode ();//mode. Lience (lience);//mode. UserName (Tv_username.gettext (). toString ());//mode. Cardtype (); String resultdata= ""; String content= ""; if (Openmap.size ()!=0) {Gsonbuilder Gsonbuilder = new Gsonbuilder (); Gsonbuilder.registertypeadapter (Exception.class, New Exceptionserializer ()); Gson Gson = Gsonbuilder.create (); Content= "josnstr=" +urlencoder.encode (Gson.tojson (Openmap), "Utf-8");} Resultdata=httpposttools.getpostreslut ("Home/gateinset", content);
Remember to determine the good type in the object type. In particular Getext () please remember ToString () ...
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Causes and solutions of abnormal Android Java.lang.IllegalStateException offending Field:mspans