开发者

Which method is the missing one in this "NoSuchMethod" exception?

I am getting the following exception for "NoSuchMethod" :

08-16 15:15:16.368: WARN/dalvikvm(3164): Unable to match class for part: 'Ljava/awt/Image;'
08-16 15:15:16.399: WARN/System.err(3164): JRegistry Error: null
08-16 15:15:16.399: WARN/System.err(3164): java.lang.NoSuchMethodExce开发者_Go百科ption
08-16 15:15:16.446: WARN/System.err(3164):     at java.lang.Class.getDeclaredMethods(Native Method)
08-16 15:15:16.446: WARN/System.err(3164):     at java.lang.ClassCache.getDeclaredMethods(ClassCache.java:153)
08-16 15:15:16.446: WARN/System.err(3164):     at java.lang.Class.getDeclaredMethods(Class.java:774)
08-16 15:15:16.454: WARN/System.err(3164):     at org.jnetpcap.packet.structure.AnnotatedHeader.inspectJHeaderClass(Unknown Source)
08-16 15:15:16.454: WARN/System.err(3164):     at org.jnetpcap.packet.JRegistry.inspect(Unknown Source)
08-16 15:15:16.454: WARN/System.err(3164):     at org.jnetpcap.packet.JRegistry.register(Unknown Source)
08-16 15:15:16.462: WARN/System.err(3164):     at org.jnetpcap.packet.JRegistry.register(Unknown Source)
08-16 15:15:16.462: WARN/System.err(3164):     at org.jnetpcap.packet.JRegistry.<clinit>(Unknown Source)
08-16 15:15:16.462: WARN/System.err(3164):     at org.jnetpcap.Pcap.datalinkToId(Unknown Source)
08-16 15:15:16.470: WARN/System.err(3164):     at org.jnetpcap.Pcap.loop(Unknown Source)
08-16 15:15:16.470: WARN/System.err(3164):     at com.gnychis.coexisyst.Wifi$WifiMon.doInBackground(Wifi.java:494)
08-16 15:15:16.493: WARN/System.err(3164):     at com.gnychis.coexisyst.Wifi$WifiMon.doInBackground(Wifi.java:1)
08-16 15:15:16.493: WARN/System.err(3164):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
08-16 15:15:16.501: WARN/System.err(3164):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
08-16 15:15:16.501: WARN/System.err(3164):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
08-16 15:15:16.509: WARN/System.err(3164):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
08-16 15:15:16.517: WARN/System.err(3164):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
08-16 15:15:16.517: WARN/System.err(3164):     at java.lang.Thread.run(Thread.java:1096)

However, I don't quite understand which method is the problem. Is it org.jnetpcap.Pcap.loop?


It actually looks to be in that invocation of Thread.run -- check your arguments. If they don't match the signature of Thread.run you would get that error, I beleive.


Seems like the org.jnetpcap.* was written for J2SE - it's looking for java.awt.Image. AWT does not exist in the Android API out of the box.

There are solutions available to use AWT (or Swing) on Android.


...dalvikvm(3164): Unable to match class for part: 'Ljava/awt/Image;'

already discussed at SO: using awt with android

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜