您的位置:首页 > 其它

The method iterator() is ambiguous for the type KafkaStream<byte[],byte[]>

2015-10-13 13:18 555 查看
ConsumerIterator<byte[],byte[]> it =stream.iterator();
这句代码老是报错,The method iterator() is ambiguous for the type KafkaStream<byte[],byte[]>

解决方法:将maven中配置

plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
删除,然后给系统应用jdk1.8,这个问题一般是由于jdk的版本导致的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: