通过Android中的twitter4j获取Twitter趋势

通过Android中的twitter4j获取Twitter趋势,android,twitter,twitter4j,Android,Twitter,Twitter4j,我是Android的初学者,希望获得Twitter趋势,但在趋势中获得空值。 我不明白我在哪里犯了错误 List<Trends> list; Trends trends; private Twitter mTwitter; public List<Trends>getDailyTrends(Date date, boolean excludeHashTags){ try{ list = mTwitter.getDailyTrends(date,

我是Android的初学者,希望获得Twitter趋势,但在趋势中获得空值。 我不明白我在哪里犯了错误

List<Trends> list; Trends trends; private Twitter mTwitter;

public  List<Trends>getDailyTrends(Date date, boolean excludeHashTags){
    try{
        list = mTwitter.getDailyTrends(date, excludeHashTags);
        Log.d("ab to aaja<><><><><>", ""+list);
    }catch (TwitterException e)
    {
        e.printStackTrace();
    }
    return list;

}
列表;趋势;私人推特;
public ListgetDailyTrends(日期,布尔值除外HashTags){
试一试{
list=mTwitter.getDailyTrends(日期,不包括hashtags);
Log.d(“ab到aaja”,“列表”);
}捕获(twitter异常)
{
e、 printStackTrace();
}
退货清单;
}
试试这个:

   public  List<Trends>getDailyTrends(Date date, boolean excludeHashTags){
        List<Trends> auxList = new ArrayList<Trends>;
        try{
            auxList = mTwitter.getDailyTrends(date, excludeHashTags);
            Log.d("ab to aaja<><><><><>", ""+list);
        }catch (TwitterException e)
        {
            e.printStackTrace();
        }
        return auxList;
    }

this.list = getDailyTrends(new SimpleDateFormat("yyyy-MM-dd").parse("2012-07-14"), true);
公共列表GetDailyTrends(日期,布尔值excludeHashTags){
List auxList=新阵列列表;
试一试{
auxList=mTwitter.getDailyTrends(日期,不包括hashtags);
Log.d(“ab到aaja”,“列表”);
}捕获(twitter异常)
{
e、 printStackTrace();
}
返回auxList;
}
this.list=getDailyTrends(新的SimpleDataFormat(“yyyy-MM-dd”).parse(“2012-07-14”),true;

还要检查
auxList
是否不为null

您还应该提供实例化mTwitter的代码,以查看是否缺少某些东西mTwitter是twitter4ji中Twitter类的对象。您知道吗,但是mTwitter的实例化是否正确?你检查过它是否为空吗?mTwitter=newtwitterApp(这个,twitter\u consumer\u key,twitter\u secret\u key);我成功地得到了提及名单、时间表和所有这些,但趋势仍然存在