[color=red]错误信息:[/color]
Could not find class ** referenced from method **
05-21 22:51:22.548: E/dalvikvm(226): Could not find class 'org.ksoap2.serialization.SoapObject', referenced from method cn.hi.bar.api.LocalAccessor.updateContactToWebService
错误原因及解决办法:
1.所建工程中没有导入jar包,如果是把别人的工程import到自己的eclipse中,需要右击工程Bulid Path->Add Libraries->User Library->User Libraries->new(起一个名字 随便A)->Add Jars(将需要的jar包添加到A中) 如图所示:
[img]
[img]http://dl.iteye.com/upload/attachment/0079/2356/f02b2c27-219a-3537-979b-b52ae8b3f2b9.jpg[/img]
[/img]
2.在properties中没有设置,右键工程->properties->Java Build Path->Order and Export 将刚刚新建的A勾选->点击ok 就可以了。如图所示:
[img]
[img]http://dl.iteye.com/upload/attachment/0079/2358/2dbb54e6-69a5-3671-a0b4-0ef3600323d6.jpg[/img]
[/img]
这样就可以将jar包一同编译到.apk文件中。在模拟器下运行就不会出Could not find class ** referenced from method **错误了。
Could not find class ** referenced from method **
05-21 22:51:22.548: E/dalvikvm(226): Could not find class 'org.ksoap2.serialization.SoapObject', referenced from method cn.hi.bar.api.LocalAccessor.updateContactToWebService
错误原因及解决办法:
1.所建工程中没有导入jar包,如果是把别人的工程import到自己的eclipse中,需要右击工程Bulid Path->Add Libraries->User Library->User Libraries->new(起一个名字 随便A)->Add Jars(将需要的jar包添加到A中) 如图所示:
[img]
[img]http://dl.iteye.com/upload/attachment/0079/2356/f02b2c27-219a-3537-979b-b52ae8b3f2b9.jpg[/img]
[/img]
2.在properties中没有设置,右键工程->properties->Java Build Path->Order and Export 将刚刚新建的A勾选->点击ok 就可以了。如图所示:
[img]
[img]http://dl.iteye.com/upload/attachment/0079/2358/2dbb54e6-69a5-3671-a0b4-0ef3600323d6.jpg[/img]
[/img]
这样就可以将jar包一同编译到.apk文件中。在模拟器下运行就不会出Could not find class ** referenced from method **错误了。