i have tried out Android Studio but now i have a Problem in my code i have tried to find a button but this dont work with this code
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Menu extends Activity implements View.OnClickListener {
Button btnspielen = (Button) findViewById(R.id.btnspielen);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu);
btnspielen.setOnClickListener(this);
}
@Override
public void onClick(View v) {}
}
but the problem now is that Android Studio says cant resolve Symbol R and I don't know why and the day before it Worked.