遇到这种报错,解决方案如下:
报错原因是访问限制报错
工具栏中Project>preferences>java-Compiler>Errors/Warnings>把右侧的【Deprecated and restricted API>Forbidden reference的Error】置为【Warning】.点击apply——>ok,然后你就会发现报错没有了。