我正在尝试为Android创建一个应用程序,我按照本教程http://developer.android.com/training/basics/firstapp/starting-activity.html
有一部分
/** Called when the user clicks the Send button */
public void sendMessage(View view) {
// Do something in response to button
}
Run Code Online (Sandbox Code Playgroud)
然后我按照本教程,一切正常,直到我删除参数 View view
我的问题就是为什么每次我删除它,所以函数只是:
/** Called when the user clicks the Send button */
public void sendMessage() {
// Do something in response to button
}
Run Code Online (Sandbox Code Playgroud)
我运行应用程序,它被迫关闭.
谁能开导我?谢谢