更新Android SDK后,我启动了Android Studio.现在它显示后台任务持续运行消息
更新索引:扫描文件到索引.
在这种模式下,它几乎被绞死,我无法继续工作.无法找到停止后台任务的方法.重启Android Studio也无法正常工作.
当我发现其中一个构造函数将"String"对象作为参数时,我正在查看String.java源代码.这看起来很简单,但我无法消化它.例如:
public class Example {
private String value;
public Example() {
// TODO Auto-generated constructor stub
}
public Example(Example e){
value = e.getValue();
}
String getValue() {
return value;
}
}
Run Code Online (Sandbox Code Playgroud)
在第一次编译类Example时,编译器会遇到第二个带有'Example'类对象作为参数的构造函数.在这一点上,它将如何找到它,因为它仍在编译这个类?