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
  • 73,284
  • 20
  • 146
  • 210
gnychis
  • 7,289
  • 18
  • 75
  • 113

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
  • 110,348
  • 25
  • 193
  • 263
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,213
  • 108
  • 53
  • 73
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
  • 76,846
  • 14
  • 164
  • 167