我试图在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)
答案 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文件夹中。