我正在尝试使用一个.net web服务,当我从手机上运行它(调试)时得到以下错误
java.lang.NoClassDefFounderror:javax.microedition.io.connector
调用传输对象时出错

ht.call(SOAP_ACTION, soapEnvelope);

虽然在EclipseIDE中,(上下文敏感模型)在我试图添加它时没有在对象模型中显示这一点,但我只看到javax.microedition.khronos.*,没有javax.microedition.io,这让我更加困惑。
当我试图在模拟器中调试时,只得到一个verifyerror
        private static final String SOAP_ACTION = "http://ikonicsoft.com/CheckTrial";
private static final String METHOD_NAME = "CheckTrial";
private static final String NAMESPACE = "http://ikonicsoft.com";
private static final String URL = "http://ikonicsoft.com/WebService.asmx";

     SoapObject request = new SoapObject(NAMESPACE,METHOD_NAME);
    request.addProperty("deviceid", deviceid);

    SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    soapEnvelope.dotNet = true;
    soapEnvelope.setOutputSoapObject(request);

    HttpTransport ht = new HttpTransport(URL);
    Boolean bValid = false;
    try{
        ht.call(SOAP_ACTION, soapEnvelope);
        Boolean result = (Boolean) soapEnvelope.getResponse();

        if((Boolean)result){
            bValid = true;
        }else{
            bValid = false;
        }

    }catch(Exception e){
        e.printStackTrace();
        bValid = false;

    }

如果你需要更多信息请告诉我
提前谢谢
帕特里克

最佳答案

好的,下载并安装正确的ksoap2包会有帮助。我在以下位置找到了Android开发的正确软件包:
ksoap2-android-assembly-2.4-jar-with-dependencies.jar

关于android - java.lang.NoClassDefFoundError:javax.microedition.io.Connector,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3072683/

10-09 00:00