Access restriction: The method 'CharacterEncoder.encode(byte[])' is not API...

  问题描述:Access restriction: The method 'CharacterEncoder.encode(byte[])' is not API...

  解决方法:这种错误是eclipse设置问题,修改eclipse的设置即可:点击Windows --> Preferences --> Java --> Complicer --> Errors/Warnings 

--> Deprecated and restricted API中的Forbidden references(access rules)选为Warning即可编译通过。

posted @ 2019-05-16 16:15  Jin1000x  阅读(921)  评论(0编辑  收藏  举报