easyrun2013

error with SimpleRenderer setLabe on 10.2.2

Discussion created by easyrun2013 on Mar 8, 2014
i want setRender with FeatureLayer, i call the method setLabel with this error.

SimpleRenderer sr = new SimpleRenderer(new SimpleFillSymbol(Color.GRAY,SimpleFillSymbol.STYLE.FORWARD_DIAGONAL));
sr.setLabel("DLBM");
System.out.println(sr.toJson());

03-09 16:16:18.945: W/System.err(24727): org.codehaus.jackson.JsonGenerationException: Can not write a field name, expecting a value
03-09 16:16:18.955: W/System.err(24727):  at org.codehaus.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480)
03-09 16:16:18.955: W/System.err(24727):  at org.codehaus.jackson.impl.WriterBasedGenerator.writeFieldName(WriterBasedGenerator.java:195)
03-09 16:16:18.955: W/System.err(24727):  at org.codehaus.jackson.impl.WriterBasedGenerator.writeStringField(WriterBasedGenerator.java:204)
03-09 16:16:18.955: W/System.err(24727):  at com.esri.core.internal.util.c.a(Unknown Source)
03-09 16:16:18.955: W/System.err(24727):  at com.esri.core.renderer.SimpleRenderer.toJson(Unknown Source)
03-09 16:16:18.955: W/System.err(24727):  at com.esri.core.renderer.BaseRenderer.toJson(Unknown Source)
03-09 16:16:18.955: W/System.err(24727):  at cn.com.activity.GisMgrActivity.setAlphaByPosition(GisMgrActivity.java:1682)
03-09 16:16:18.955: W/System.err(24727):  at cn.com.activity.GisMgrActivity.resetAlpha(GisMgrActivity.java:1671)
03-09 16:16:18.955: W/System.err(24727):  at cn.com.activity.GisMgrActivity.onCreate(GisMgrActivity.java:338)
03-09 16:16:18.955: W/System.err(24727):  at android.app.Activity.performCreate(Activity.java:5369)
03-09 16:16:18.955: W/System.err(24727):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
03-09 16:16:18.955: W/System.err(24727):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)
03-09 16:16:18.955: W/System.err(24727):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
03-09 16:16:18.955: W/System.err(24727):  at android.app.ActivityThread.access$700(ActivityThread.java:165)
03-09 16:16:18.955: W/System.err(24727):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326)
03-09 16:16:18.955: W/System.err(24727):  at android.os.Handler.dispatchMessage(Handler.java:99)
03-09 16:16:18.955: W/System.err(24727):  at android.os.Looper.loop(Looper.java:137)
03-09 16:16:18.955: W/System.err(24727):  at android.app.ActivityThread.main(ActivityThread.java:5450)
03-09 16:16:18.955: W/System.err(24727):  at java.lang.reflect.Method.invokeNative(Native Method)
03-09 16:16:18.955: W/System.err(24727):  at java.lang.reflect.Method.invoke(Method.java:525)
03-09 16:16:18.955: W/System.err(24727):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
03-09 16:16:18.955: W/System.err(24727):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
03-09 16:16:18.955: W/System.err(24727):  at dalvik.system.NativeStart.main(Native Method)
03-09 16:16:18.955: W/ArcGIS(24727): Can not write a field name, expecting a value

Outcomes