I'm really not sure why I get this error. It's probably something simple but I'm new to this.
final Button calculate = (Button) findViewById(R.id.calculate);
calculate.setOnClickListener(new View.OnClickListener() {
// Implement the OnClickListener callback
private void onClick(Button calculate) {
double perimeter = 2 * (Math.PI * entry); //error on this line
System.out.print(perimeter);
}
public void onClick(View v) {
// TODO Auto-generated method stub
}
}
);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…