Warning: org.json.me.JSONArray: can't find ref

2019-08-17 01:21发布

Warning: org.json.me.JSONArray: can't find referenced class java.lang.StringBuilder

I have checked all java file of json.me but in that no java.lang.StringBuilder is used

I got this warning when I am compiling my j2me project.

How to remove this warning from project. I got this json.me from this link Download link of json.me

Please give me solution about that. Thanks

标签: java java-me
2条回答
\"骚年 ilove
2楼-- · 2019-08-17 01:36

I encountered this error learning j2me right now. Fixed it by adding a compiler flag: 'javac -source 1.4 ....' .

The reason is, Java 1.5+ uses StringBuilder which replaces StringBuffer. But JavaME implementation doesn't have the StringBuilder, it requires using the old StringBuffer for the same operations. So compile your J2ME class as Java 1.4 so it uses the old method.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-08-17 01:45

java.lang.StringBuilder is found in the JDK. I think StringBuffer is available in Java ME. Use that instead.

Also, I checked the code from the link provided, I see no reference to StringBuilder but I see references to StringBuffer.

查看更多
登录 后发表回答