用OSS的DEMO API 做移动开发
在下面的代码中
OSSClient client = new OSSClient(OSS_ENDPOINT, ACCESS_ID, ACCESS_KEY, config);
总会报java.lang.NoSuchMethodError: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.<init>
我是用android平台来做的。。。
但是如果是用JAVA平台来做却是可以正常的上传和下载 。。
可以请问是什么原因吗,下面是全部的异常
06-16 17:14:45.608: E/AndroidRuntime(18247): FATAL EXCEPTION: main
06-16 17:14:45.608: E/AndroidRuntime(18247): java.lang.NoSuchMethodError: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.<init>
06-16 17:14:45.608: E/AndroidRuntime(18247): at com.aliyun.common.comm.HttpFactory.createThreadSafeClientConnManager(HttpFactory.java:104)
06-16 17:14:45.608: E/AndroidRuntime(18247): at com.aliyun.common.comm.HttpFactory.createHttpClient(HttpFactory.java:65)
06-16 17:14:45.608: E/AndroidRuntime(18247): at com.aliyun.common.comm.DefaultServiceClient.<init>(DefaultServiceClient.java:35)
06-16 17:14:45.608: E/AndroidRuntime(18247): at com.aliyun.openservices.oss.OSSClient.<init>(OSSClient.java:134)
06-16 17:14:45.608: E/AndroidRuntime(18247): at com.example.oss.MainActivity2.onCreate(MainActivity2.java:52)
06-16 17:14:45.608: E/AndroidRuntime(18247): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-16 17:14:45.608: E/AndroidRuntime(18247): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
06-16 17:14:45.608: E/AndroidRuntime(18247): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
06-16 17:14:45.608: E/AndroidRuntime(18247): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
06-16 17:14:45.608: E/AndroidRuntime(18247): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
06-16 17:14:45.608: E/AndroidRuntime(18247): at android.os.Handler.dispatchMessage(Handler.java:99)
06-16 17:14:45.608: E/AndroidRuntime(18247): at android.os.Looper.loop(Looper.java:130)
06-16 17:14:45.608: E/AndroidRuntime(18247): at android.app.ActivityThread.main(ActivityThread.java:3835)
06-16 17:14:45.608: E/AndroidRuntime(18247): at java.lang.reflect.Method.invokeNative(Native Method)
06-16 17:14:45.608: E/AndroidRuntime(18247): at java.lang.reflect.Method.invoke(Method.java:507)
06-16 17:14:45.608: E/AndroidRuntime(18247): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
06-16 17:14:45.608: E/AndroidRuntime(18247): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
06-16 17:14:45.608: E/AndroidRuntime(18247): at dalvik.system.NativeStart.main(Native Method)
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。