【问题标题】:java.lang.NoClassDefFoundError: oauth.signpost.commonshttp.CommonsHttpOAuthConsumer androidjava.lang.NoClassDefFoundError: oauth.signpost.commonshttp.CommonsHttpOAuthConsumer android
【发布时间】:2011-12-05 10:23:40
【问题描述】:

我正在通过 SocialLib 项目使用 twitter 集成。但事情是不断得到 ​​p>

java.lang.NoClassDefFoundError: oauth.signpost.commonshttp.CommonsHttpOAuthConsumer 

排队

httpOauthConsumer = new CommonsHttpOAuthConsumer(consumerKey, consumerSecret);

我的进口是:

import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.commonshttp.CommonsHttpOAuthProvider;
import oauth.signpost.exception.OAuthCommunicationException;
import oauth.signpost.exception.OAuthExpectationFailedException;
import oauth.signpost.exception.OAuthMessageSignerException;
import oauth.signpost.exception.OAuthNotAuthorizedException;

以及我使用和下载的罐子:http://code.google.com/p/oauth-signpost/downloads/list

如何解决这个问题?

汉克斯

【问题讨论】:

标签: android oauth twitter-oauth


【解决方案1】:

这里是 jarlibrary:http://code.google.com/p/oauth-signpost/downloads/detail?name=signpost-commonshttp4-1.2.1.1.jar&can=2&q= 您应该将它作为外部 jar 添加到您的项目中。

【讨论】:

  • 我粘贴的jar是附加的。我有类似的问题,当我添加这个 jar 时,问题就消失了。
  • @chinna_82 感谢您的反对,不过我已经通过这种方式解决了我自己的问题。
  • +1 因为它对我有用。你能解释一下这个罐子里额外的东西是什么吗?
猜你喜欢
  • 2012-05-06
  • 2012-04-09
  • 1970-01-01
  • 2015-09-25
  • 2021-12-10
  • 2016-03-13
  • 2015-04-28
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多