当我在android studio上创建一个新项目时,它没有给出任何问题,但我查看了activity_main.xml设计,它向我展示了这一点:"呈现问题渲染期间引发的异常:action_bar".我知道如何解决这个问题,只是在渲染期间列出这个问题android studio sdk 22版异常:action_bar
但我想知道为什么会发生这种情况,有些人知道吗?
代码如下
BufferedWriter bw = null;
try
{
bw = new BufferedWriter(new OutputStreamWriter(System.out));
for(Student stu: ts) {
bw.write(stu.toString());
bw.newLine();
bw.flush();
}
bw.close();
System.out.println("print something");
} catch(Exception e) {
System.out.println("fail...");
}
Run Code Online (Sandbox Code Playgroud)
似乎BufferedWriter close()导致阻塞,和
System.out.println("打印东西");
无效,无法打印任何东西.为什么?