想学习一下 webservice,
引用ksoap2-android-assembly-2.4-jar-with-dependencies.jar
和ksoap2-android-assembly-2.5.4-jar-with-dependencies+-+withTimeOut.jar都有如下错误,请问是什么原因导致的?
06-06 09:59:05.741: ERROR/dalvikvm(14202): Could not find class 'org.ksoap2.serialization.PropertyInfo', referenced from method org.join.weather.util.WebService.returnStringArrayMethod
06-06 09:59:05.881: ERROR/dalvikvm(14202): Could not find class 'org.ksoap2.serialization.SoapObject', referenced from method org.join.weather.util.WebService.visitWebService
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): FATAL EXCEPTION: AsyncTask #1
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): java.lang.RuntimeException: An error occured while executing doInBackground()
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at android.os.AsyncTask$3.done(AsyncTask.java:200)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at java.lang.Thread.run(Thread.java:1019)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): Caused by: java.lang.NoClassDefFoundError: org.ksoap2.serialization.PropertyInfo
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at org.join.weather.util.WebService.returnStringArrayMethod(WebService.java:168)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at org.join.weather.util.WebService.getWeatherbyCityName(WebService.java:157)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at org.join.weather.WeatherEdit$WebServiceTask.doInBackground(WeatherEdit.java:187)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at org.join.weather.WeatherEdit$WebServiceTask.doInBackground(WeatherEdit.java:1)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at android.os.AsyncTask$2.call(AsyncTask.java:185)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
06-06 09:59:07.771: ERROR/AndroidRuntime(14202): ... 4 more
------解决方案--------------------
应该是你下的包不对,重新下一个看看
之前我也遇到过。