我在调用dotnet webservice时遇到此问题。
这是我的doinbackground
protected Void doInBackground(String... params) {
//Log.w("myApp", "in async");
//Call Web Method
loginStatus = WebService.invokeLoginWS(editTextUsername,editTextPassword,"Login");
//Log.w("myApp", String.valueOf(loginStatus));
return null;
}
这是我的所在地。
07-08 03:29:32.467: W/dalvikvm(1341): threadid=11: thread exiting with uncaught exception (group=0xb4ab5ba8)
07-08 03:29:32.497: E/AndroidRuntime(1341): FATAL EXCEPTION: AsyncTask #1
07-08 03:29:32.497: E/AndroidRuntime(1341): Process: com.prgguru.example, PID: 1341
07-08 03:29:32.497: E/AndroidRuntime(1341): java.lang.RuntimeException: An error occured while executing doInBackground()
07-08 03:29:32.497: E/AndroidRuntime(1341): at android.os.AsyncTask$3.done(AsyncTask.java:300)
07-08 03:29:32.497: E/AndroidRuntime(1341): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
07-08 03:29:32.497: E/AndroidRuntime(1341): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
07-08 03:29:32.497: E/AndroidRuntime(1341): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
07-08 03:29:32.497: E/AndroidRuntime(1341): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
07-08 03:29:32.497: E/AndroidRuntime(1341): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
07-08 03:29:32.497: E/AndroidRuntime(1341): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
07-08 03:29:32.497: E/AndroidRuntime(1341): at java.lang.Thread.run(Thread.java:841)
07-08 03:29:32.497: E/AndroidRuntime(1341): Caused by: java.lang.NullPointerException
07-08 03:29:32.497: E/AndroidRuntime(1341): at com.prgguru.example.WebService.invokeLoginWS(WebService.java:79)
07-08 03:29:32.497: E/AndroidRuntime(1341): at com.prgguru.example.CheckDNLoginActivity$AsyncCallWS.doInBackground(CheckDNLoginActivity.java:72)
07-08 03:29:32.497: E/AndroidRuntime(1341): at com.prgguru.example.CheckDNLoginActivity$AsyncCallWS.doInBackground(CheckDNLoginActivity.java:1)
07-08 03:29:32.497: E/AndroidRuntime(1341): at android.os.AsyncTask$2.call(AsyncTask.java:288)
07-08 03:29:32.497: E/AndroidRuntime(1341): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
07-08 03:29:32.497: E/AndroidRuntime(1341): ... 4 more
任何帮助都是适当的。