io.netty.bootstrap.Bootstrap.channel(Ljava/lang/Class;)Lio/netty/bootstrap/Bootstrap

Exception in thread “main” java.lang.NoSuchMethodError: io.netty.bootstrap.Bootstrap.channel(Ljava/lang/Class;)Lio/netty/bootstrap/Bootstrap;

自己编写Netty client端时,出现如上错误,原因是依赖包有冲突,原因如下:
Project 右键 -> build Path -> config build path:
io.netty.bootstrap.Bootstrap.channel(Ljava/lang/Class;)Lio/netty/bootstrap/Bootstrap
多了这么一个reference library依赖库,因为我本身在Maven Library中有写入Netty-all依赖,去掉这个reference Library就恢复正常了。这应该是一类问题,如果发生了,第一时间去排除依赖包的问题。