Android应用在新的Android SDk更新中无法正常运行? [英] Android app is not working properly in new Android SDk updates?

查看:119
本文介绍了Android应用在新的Android SDk更新中无法正常运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

0 down vote最喜欢的





我是android开发的新手。现在我正在一个现有的android项目中工作。这个应用程序在android 2.3中工作但是当我将android sdk更新为4.4时它无法正常工作。这是一个Web服务GetCurrentConnectionString(),用于从asp代码通过webservice获取连接字符串。为此他们使用



httpTransport.call(SOAP_ACTION,信封)



但是它给出了一个例外。我不知道究竟发生了什么。我更新了所有Android SDK,请帮帮我。我把下面的所有代码都用于该功能。



0 down vote favorite


I am new in android development.Now I am working in one existing android project . This application is working in android 2.3 but when I update android sdk to 4.4 it is not working properly. Here is one webservice GetCurrentConnectionString() for getting connection string through webservice from asp code . For that they use

httpTransport.call(SOAP_ACTION, envelope)

but it gives an exception .I don't know what exactly happened. I updated all the Android SDKs please help me. I put all the code below for that function.

 public String GetCurrentConnectionString(){
     public final String WSDL_TARGET_NAMESPACE = "http://tempuri.org/";
        final String OPERATION_NAME = "GetCurrentConnectionString";             
        final String SOAP_ACTION = WSDL_TARGET_NAMESPACE + OPERATION_NAME;

        SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME);
        SoapSerializationEnvelope envelope = new      SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;     
            envelope.setOutputSoapObject(request);
        HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
        Object response=null;
        try
        {  
            httpTransport.call(SOAP_ACTION, envelope);
            response = envelope.getResponse().toString();    
        }
         catch (Exception e) { 

             response="Exception"; 
         }
        return response.toString(); 
}

推荐答案

我把这条错误信息写入谷歌,因为我不是Android开发人员,也不知道解决方案。这是第一个链接:

谷歌搜索第一个结果 [ ^ ]

其中有一个将方法转换为AsyncTask的示例以及必须记住在清单文件中添加内容的注释。



我建议您阅读,因为我相信它应该解决你的问题。
I put that error message into google as I am not an Android developer and have no idea about the solution. This is the first link:
Googles first result[^]
In it there is an example of converting a method to be an AsyncTask along with a note that you must remember to add something to the manifest file.

I suggest you have a read as I believe it should solve your problem.


这篇关于Android应用在新的Android SDk更新中无法正常运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆