Prabhu M Prabhu M - 1 year ago 109
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.