Android不检测外部库

时间:2013-08-29 11:26:43

标签: android http

我正在尝试使用HTTP将图像发送到服务器。外部库 httpmime-4.0-beta2.jar 公地IO-2.4.jar Apache的mime4j-0.6.jar 已被添加。 我得到以下logcat输出作为错误,可能是什么原因?

08-29 15:49:19.422: W/dalvikvm(2723): Unable to resolve superclass of Lorg/apache/http/entity/mime/content/AbstractContentBody; (849)
08-29 15:49:19.462: W/dalvikvm(2723): Link of class 'Lorg/apache/http/entity/mime/content/AbstractContentBody;' failed
08-29 15:49:19.462: W/dalvikvm(2723): Unable to resolve superclass of Lorg/apache/http/entity/mime/content/InputStreamBody; (838)
08-29 15:49:19.462: W/dalvikvm(2723): Link of class 'Lorg/apache/http/entity/mime/content/InputStreamBody;' failed
08-29 15:49:19.462: E/dalvikvm(2723): Could not find class 'org.apache.http.entity.mime.content.InputStreamBody', referenced from method com.example.photoupload.MainActivity.onCreate
08-29 15:49:19.462: W/dalvikvm(2723): VFY: unable to resolve new-instance 841 (Lorg/apache/http/entity/mime/content/InputStreamBody;) in Lcom/example/photoupload/MainActivity;
08-29 15:49:19.462: D/dalvikvm(2723): VFY: replacing opcode 0x22 at 0x0043
08-29 15:49:19.832: D/dalvikvm(2723): GC_FOR_ALLOC freed 52K, 3% free 8964K/9223K, paused 81ms
08-29 15:49:19.882: D/dalvikvm(2723): GC_FOR_ALLOC freed 4K, 4% free 9216K/9543K, paused 40ms
08-29 15:49:19.892: D/AndroidRuntime(2723): Shutting down VM
08-29 15:49:19.892: W/dalvikvm(2723): threadid=1: thread exiting with uncaught exception (group=0x40014760)
08-29 15:49:19.892: E/AndroidRuntime(2723): FATAL EXCEPTION: main
08-29 15:49:19.892: E/AndroidRuntime(2723): java.lang.NoClassDefFoundError: org.apache.http.entity.mime.content.InputStreamBody
08-29 15:49:19.892: E/AndroidRuntime(2723):     at com.example.photoupload.MainActivity.onCreate(MainActivity.java:39)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1712)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1764)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at android.app.ActivityThread.access$1500(ActivityThread.java:122)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1002)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at android.os.Looper.loop(Looper.java:132)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at android.app.ActivityThread.main(ActivityThread.java:4025)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at java.lang.reflect.Method.invokeNative(Native Method)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at java.lang.reflect.Method.invoke(Method.java:491)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
08-29 15:49:19.892: E/AndroidRuntime(2723):     at dalvik.system.NativeStart.main(Native Method)
08-29 15:49:21.842: I/Process(2723): Sending signal. PID: 2723 SIG: 9

0 个答案:

没有答案