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文件?
答案 0 :(得分:1)
无需再包含.jar文件,仅包含以下方法
public void onStallWarning(StallWarning arg0) {
}
您的代码将成功编译并运行。
希望这有帮助!!!