import com.sun.image.codec.jpeg.ImageFormatException;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageDecoder;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
其中image标红,请问各位大佬这个问题怎么解决啊。

解决方案 »

  1.   

    com.sun.*是受限制访问的API,Eclipse 默认把受访问限制的API设成了ERROR。只要把Windows>Preferences>Java>Complicer>Errors/Warnings>Deprecated and restricted API>Forbidden references(access rules)改为Warning就可以编译通过,不再报错
      

  2.   

    eclipse里面没有问题,但是导入android studio的时候报错,不知道怎么解决。
      

  3.   

    eclipse里面没有问题,但是导入android studio的时候报错,不知道怎么解决。