public static void main(String[] args) throws TwitterException, IOException{
StatusListener listener = new StatusListener(){
public void onStatus(Status status) {
System.out.println(status.getUser().getName() + " : " + status.getText());
}
public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {}
public void onTrackLimitationNotice(int numberOfLimitedStatuses) {}
public void onException(Exception ex) {
ex.printStackTrace();
}我正在使用上面的代码来下载流媒体推文。我得到了这个错误。
The type new StatusListener(){} must implement the inherited abstract method StatusListener.onStallWarning(StallWarning)
The type new StatusListener(){} must implement the inherited abstract method StatusListener.onScrubGeo(long, long).
我需要包含任何特定的jar文件吗?
发布于 2015-06-09 21:50:34
不需要包含更多的.jar文件,只需包含以下方法
public void onStallWarning(StallWarning arg0) {
}您的代码将成功编译和运行。
希望这能有所帮助!
https://stackoverflow.com/questions/16830345
复制相似问题