Prabhu M Prabhu M - 1 year ago 155
Android Question

NoClassDefFoundError: javax.jmdns.JmDNS

I am trying to jmDNS jar , but when I run my app it is throwing error like NoClassDefFoundError: javax.jmdns.JmDNS .

It is throwing error from this line

jmdns = JmDNS.create();

Answer Source

Make sure your jar is included in your projects /libs directory. That is the only place that will ensure it is properly added to the jvm at runtime on device. There can be several other issues which you should used adb logcat *:D to watch the classloading to discover. Look for L errors happening before the exception itself.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download