开发者社区> 问答> 正文

Android上有么有ots运行的例子

祥云湾 2015-09-03 18:26:26 7316
目前我在android导入lib包后在运行到
  OTSClient client = new OTSClient(endPoint, accessId, accessKey,    instanceName);
时总是报错

java.lang.NoSuchMethodError: No virtual method setDefaultMaxPerRoute(I)V in class Lorg/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager; or its super classes (declaration of 'org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager' appears in /system/framework/ext.jar)
     at com.aliyun.common.comm.HttpFactory.createThreadSafeClientConnManager(HttpFactory.java:106)
     at com.aliyun.common.comm.HttpFactory.creatHttpClient(HttpFactory.java:66)
     at com.aliyun.common.comm.DefaultServiceClient.<init>(DefaultServiceClient.java:39)
     at com.aliyun.openservices.ots.OTSClient.<init>(OTSClient.java:130)
     at com.aliyun.openservices.ots.OTSClient.<init>(OTSClient.java:92)
     at com.aliyun.openservices.ots.OTSClient.<init>(OTSClient.java:75)
     at com.allen.yun.ots.OTSSingleDataSample.main(OTSSingleDataSample.java:52)
     at com.allen.yun.ots.MainActivity.onCreate(MainActivity.java:47)
     at android.app.Activity.performCreate(Activity.java:6550)
     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3102)
     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3248)
     at android.app.ActivityThread.access$1000(ActivityThread.java:197)
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1681)
     at android.os.Handler.dispatchMessage(Handler.java:102)
     at android.os.Looper.loop(Looper.java:145)
     at android.app.ActivityThread.main(ActivityThread.java:6872)
     at java.lang.reflect.Method.invoke(Native Method)
     at java.lang.reflect.Method.invoke(Method.java:372)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)






阿里云什么时候能出移动上支持的demo,方便开发者呢?
Apache Android开发 开发者
分享到
取消 提交回答
全部回答(0)

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题
推荐课程