问题
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?
回答1:
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
回答2:
This is error can also be raised if you have more than one Activity and if you try to access one Activity without Registering in the AndroidManifest.xml file. So make sure that you have registered all your Activity class under this xml file. eg. if u have an activity called Act you will register as
<application ...............>
----------
----------
<activity android:name=".Act2" /> here goes your registration.
</application>
回答3:
This class is not in android, its in j2me.
来源:https://stackoverflow.com/questions/9376866/how-can-i-overcome-the-androidruntime331-java-lang-noclassdeffounderror-jav