右击项目 -> Properties -> Java Build Path -> libraries -> Add library -> JRE System Library 参考: android - Eclipse: "The import java.io cannot be resolved" - Stack Overflowhttps://stackoverflow.com/questions/15416186/eclipse-the-import-java-io-cannot-be-resolved