1

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.NoSuchMethodException
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?

Paŭlo Ebermann
  • 71,139
  • 18
  • 140
  • 206
gnychis
  • 6,819
  • 16
  • 71
  • 107

3 Answers3

1

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.

Charlie Martin
  • 107,118
  • 23
  • 189
  • 257
0

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

already discussed at SO: using awt with android

Community
  • 1
  • 1
gnat
  • 6,205
  • 103
  • 52
  • 72
0

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.

EboMike
  • 75,005
  • 14
  • 154
  • 164