Search code examples
androidweb-servicesksoap2

How can I overcome the /AndroidRuntime(331): java.lang.NoClassDefFoundError: javax.microedition.io.Connector error in Android?


I am using the ksoap2-android-2.5.2 for SOAP webservices Login like this

HttpTransportBasicAuth aht = new  HttpTransportBasicAuth(URL, username , pass);

When I run the program I get the following exception.

02-08 16:57:27.014: E/AndroidRuntime(331): java.lang.NoClassDefFoundError:
                                                javax.microedition.io.Connector

How can I get that class to our KSOAP2 Library?


Solution

  • You are probably not using the correct kSoap package for Android.

    See this post: java.lang.NoClassDefFoundError: javax.microedition.io.Connector and the following link