【发布时间】:2013-03-12 21:36:00
【问题描述】:
我正在尝试做一个 twitter android 应用程序。我仍在处理登录。 所以我在朋友建议我使用 asynctaskloader 之后使用它。我相信我在这一行得到了一个空指针异常:
this.consumer = (OAuthConsumer) new getCommonsHttpOAuthConsumer(context);
这是我的 asynctaskloader 类:
class getCommonsHttpOAuthConsumer extends AsyncTaskLoader{
public getCommonsHttpOAuthConsumer(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
@Override
public OAuthConsumer loadInBackground() {
// TODO Auto-generated method stub
return new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);
}
}
我做错了什么?你们需要查看更多代码吗? 谢谢。
【问题讨论】:
标签: nullpointerexception asynctaskloader