Access restriction: The type 'FileURLConnection' is not API

遇到这种报错,解决方案如下:

报错原因是访问限制报错

工具栏中Project>preferences>java-Compiler>Errors/Warnings>把右侧的【Deprecated and restricted API>Forbidden reference的Error】置为【Warning】.点击apply——>ok,然后你就会发现报错没有了。

原文地址:https://www.cnblogs.com/peterpan-/p/5936079.html