English 中文(简体)
如果结果无效,在要求网络服务之后,申请会很意外。
原标题:Application close unexpectedly after calling web service if result is null
  • 时间:2011-04-13 07:16:13
  •  标签:
  • android

i 在我的节目中使用以下线线,打电话,取得结果

所有东西都是罚款的,但如果某一网页没有任何内容,则该网页具有完全的或白色的空间,那么该网页就会被意外地应用。

           1) SoapPrimitive result=null;
           2) androidHttpTransport.call(SOAP_ACTION, envelope);
               //upto this line program run smoothly
           3) result = (SoapPrimitive)envelope.getResponse();

plz建议我,如何处理这一问题,因为,在完成3行之后,我只能检查结果价值,但在完成线号之前就会出现错误。 3. 。

i 先检查结果=(SoapPrimitive)envelope。

waiting for reply

最佳回答

您应检查无效。 并且如果无效,就会产生新的目标,并具有某种违约价值或其他类似价值。 你们可以发现这种无效价值,并且能够按法典处理。

不要试图通过“工业捕获”加以处理,在移动应用方面,这种控制非常昂贵。

问题回答

仅限<>null。 在做任何事情之前检查。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签