我有个问题.
当我将Android SDK工具更新为版本17,并将ADT更新为17时,我不能再使用ksoap2.
我启动应用程序并收到此错误:
03-25 20:13:49.995: E/AndroIDRuntime(555): FATAL EXCEPTION: main03-25 20:13:49.995: E/AndroIDRuntime(555): java.lang.NoClassDefFoundError: org.ksoap2.serialization.soapObject03-25 20:13:49.995: E/AndroIDRuntime(555): at com.alcad.pernat.praksa.SplashScreen.pridobIDanasnjo(SplashScreen.java:124)03-25 20:13:49.995: E/AndroIDRuntime(555): at com.alcad.pernat.praksa.SplashScreen.onCreate(SplashScreen.java:73)03-25 20:13:49.995: E/AndroIDRuntime(555): at androID.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)03-25 20:13:49.995: E/AndroIDRuntime(555): at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2627)03-25 20:13:49.995: E/AndroIDRuntime(555): at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)03-25 20:13:49.995: E/AndroIDRuntime(555): at androID.app.ActivityThread.access00(ActivityThread.java:125)03-25 20:13:49.995: E/AndroIDRuntime(555): at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)03-25 20:13:49.995: E/AndroIDRuntime(555): at androID.os.Handler.dispatchMessage(Handler.java:99)03-25 20:13:49.995: E/AndroIDRuntime(555): at androID.os.Looper.loop(Looper.java:123)03-25 20:13:49.995: E/AndroIDRuntime(555): at androID.app.ActivityThread.main(ActivityThread.java:4627)03-25 20:13:49.995: E/AndroIDRuntime(555): at java.lang.reflect.Method.invokeNative(Native Method)03-25 20:13:49.995: E/AndroIDRuntime(555): at java.lang.reflect.Method.invoke(Method.java:521)03-25 20:13:49.995: E/AndroIDRuntime(555): at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)03-25 20:13:49.995: E/AndroIDRuntime(555): at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:626)03-25 20:13:49.995: E/AndroIDRuntime(555): at dalvik.system.NativeStart.main(Native Method)
我应该用一些数字来获取String,但我却收到此错误.
我正在使用ksoap2-2.5.4.jar并尝试了新的ksoap2-androID-assembly-2.6.2-jar-with-dependencIEs.jar.
我使用的是Eclipse靛蓝,Ubuntu 11.04.
代码如下:
SoapObject Request =new SoapObject(nameSPACE,METHOD_name); // Here I get the error SoapSerializationEnvelope soapEnvelope=new SoapSerializationEnvelope(SoapEnvelope.VER11); soapEnvelope.dotNet=false; String tmp=odstejDatum(datum); Request.addProperty("datumod",tmp); Request.addProperty("datumdo",datum); Request.addProperty("tip_lme",1); @SuppressWarnings("deprecation") httpTransportSE aht=new httpTransportSE(URL,5000); soapEnvelope.setoutputSoapObject(Request); // aht.call(SOAP_ACTION_DANASNJI,soapEnvelope); Object response= soapEnvelope.getResponse();
谢谢您的帮助.
解决方法:
AndroID SDK工具的版本为17,而ADT的版本为17,它们将库结构更改为more details.
Here is the fix:
删除“ ksoap2-androID-assembly-2.6.2-jar-with-dependencIEs.jar”
从构建路径开始.
copy the jar file into libs folder
(如果不存在,请创建它),然后从您的文件夹中删除jar文件(如果您的项目中有自定义的jar文件夹).
它会自动将其带入构建路径.然后,清理项目并运行.
总结以上是内存溢出为你收集整理的更新Android SDK和ADT后出现Ksoap2错误全部内容,希望文章能够帮你解决更新Android SDK和ADT后出现Ksoap2错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)