sadButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v){
Intent response = new Intent(MainActivity.this, UserResponse.class);
startActivity(response);
}
}
错误: setonClickListener(无法解析符号),无法解析符号v
之前我尝试过这段代码,但没有任何错误。那么这里有什么问题?
答案 0 :(得分:0)
just add ); in the end like this
sadButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v){
Intent response = new Intent(MainActivity.this,UserResponse.class);
startActivity(response);
}
});