我想解决这个错误
R无法解析为变量
我查了许多答案,但我找不到合适的答案; 我尝试了一切.任何人都可以帮助我吗?
我自动创建的主要活动.从以下三行开始显示错误case R.id.button1::
package de.vogella.android.temprature1;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.Toast;
public class Convert extends Activity {
private EditText text;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
text = (EditText) findViewById(R.id.editText1);
}
// This method is called at button click because we assigned the name to the
// "On Click property" of the button
public void myClickHandler(View view) {
switch (view.getId()) {
case R.id.button1:
RadioButton celsiusButton = (RadioButton) …Run Code Online (Sandbox Code Playgroud) android ×1