我正在尝试使用 flickrj 向 Flickr 发送单个 ping 测试。我正在一步一步地按照教程here
https://github.com/callmeal/Flickr4Java
导入所有 Maven 依赖项和所有内容,最后得到以下代码:
import java.util.Collections;
import com.flickr4java.flickr.Flickr;
import com.flickr4java.flickr.REST;
import com.flickr4java.flickr.collections.Collection;
import com.flickr4java.flickr.test.TestInterface;
public class hello {
public static void main(String args[]){
String apiKey = "3f7046fe0897516df587cc3e6226f878";
String sharedSecret = "9d0ceef5f2f3040f";
Flickr f = new Flickr(apiKey, sharedSecret, new REST());
TestInterface testInterface = f.getTestInterface();
Collection results = testInterface.echo(Collections.EMPTY_MAP);
}
}
我收到以下错误:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Type mismatch: cannot convert from Collection<Element> to Collection
at hello.main(hello.java:18)
我究竟做错了什么?