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即可编译通过。

相关文章