混淆在j2me中失败了

时间:2012-12-10 08:05:32

标签: java-me obfuscation

我试图在j2me中混淆我的项目..但它显示以下错误。我发现这个混淆错误只发生在我的项目中导入Json.jar时..如果我删除这个jar意味着混淆是发生..请帮我解决这个问题。提前谢谢。

Warning: org.json.me.JSONArray: can't find referenced method 'java.lang.Object remove(int)' in class java.util.Vector
Warning: there were 1 unresolved references to program class members.
         Your input classes appear to be inconsistent.
         You may need to recompile them and try again.
         Alternatively, you may have to specify the options 
         '-dontskipnonpubliclibraryclasses' and/or
         '-dontskipnonpubliclibraryclassmembers'.
Error: Please correct the above warnings first.
C:\Users\Ponmani\Documents\TThehinduNov22ponmani\nbproject\build-impl.xml:427: Obfuscation failed with error code 1.
BUILD FAILED (total time: 4 seconds)

1 个答案:

答案 0 :(得分:2)

发生此错误是因为JSONArray类使用remove(int)类中的Vector方法,但此方法不适用于Java ME:http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/java/util/Vector.html

您选择了库的Java Se版本。请尝试使用其他库:https://github.com/upictec/org.json.me/

<强>更新
有一个ZIP按钮,您可以在其中下载存储库作为zip文件 在zip文件中输入/ src / main / java 复制组织文件夹并将其粘贴到您的src文件夹中。