Multiple errors in layout. <view> cannot be resolved or is not a field
<p>while running the temperatureconverter app... in the following lines of TemperatureConverter.java</p>

<pre><code>setContentView(R.layout.main); 
text = (EditText) findViewById(R.id.editText1); 
RadioButton celsiusButton = (RadioButton) findViewById(R.id.radio0); 
RadioButton fahrenheitButton = (RadioButton) findViewById(R.id.radio1); 
</code></pre>

<p>im getting the following 4 errors :</p>

<ul>
<li>main cannot be resolved or is not a field</li>
<li>editText1 cannot be    resolved or is not a field</li>
<li>radio0 cannot be resolved or is not a field</li>
<li>radio1 cannot be resolved or is not a field</li>
</ul>

<p>please help me out to solve these errors.i hav this as my assignment project . so pls....
 the entire source code of the app is been given below.</p>

<pre><code>1.main.xml


&lt;?xml version="1.0" encoding="utf-8"?&gt; 
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/myshape"
android:orientation="vertical" &gt; 

&lt;EditText 
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberSigned" &gt; 
&lt;requestFocus/&gt;
&lt;/EditText&gt; 

&lt;RadioGroup 
android:id="@+id/radioGroup1"
android:layout_width="match_parent"
android:layout_height="wrap_content" &gt; 

&lt;RadioButton 
android:id="@+id/radio0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/celsius" &gt; 
&lt;/RadioButton&gt; 

&lt;RadioButton 
android:id="@+id/radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/fahrenheit" &gt; 
&lt;/RadioButton&gt; 
&lt;/RadioGroup&gt; 

&lt;Button 
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/calc" 
android:onClick="myClickHandler"&gt; 
&lt;/Button&gt; 

&lt;/LinearLayout&gt;



3.)  res/drawable/myshape.xml:
    &lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;shape 
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"&gt; 
&lt;stroke 
android:width="2dp"
android:color="#FFFFFFFF" /&gt; 
&lt;gradient 
android:endColor="#DDBBBBBB"
android:startColor="#DD777777"
android:angle="90" /&gt; 
&lt;corners 
android:bottomRightRadius="7dp"
android:bottomLeftRadius="7dp"
android:topLeftRadius="7dp"
android:topRightRadius="7dp" /&gt; 
&lt;/shape&gt;

4.) res/values/strings.xml:

&lt;resources&gt; 

&lt;string name="hello_world"&gt;Hello world!&lt;/string&gt; 
&lt;string name="menu_settings"&gt;Settings&lt;/string&gt; 
&lt;string name="title_activity_convert_temperture_example"&gt;ConvertTempertureExample&lt;/string&gt; 
&lt;string name="app_name"&gt;Temparature Converter&lt;/string&gt; 
&lt;color name="myColor"&gt;#3399CC&lt;/color&gt; 
&lt;string name="myClickHandler"&gt;myClickHandler&lt;/string&gt; 
&lt;string name="celsius"&gt;to Celsius&lt;/string&gt; 
&lt;string name="fahrenheit"&gt;to Fahrenheit&lt;/string&gt; 
&lt;string name="calc"&gt;Calculate&lt;/string&gt; 

&lt;/resources&gt;



5.) TemperatureConverter.java file 
package com.example.TemperatureConverter; 
import android.app.Activity; 
import android.os.Bundle; 
import android.view.View; 
import android.widget.EditText; 
import android.widget.RadioButton;

import android.widget.RadioGroup; 
import android.widget.Toast; 
   import android.R;
public class TempertureConverter 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) findViewById(R.id.radio0); 
RadioButton fahrenheitButton = (RadioButton) findViewById(R.id.radio1); 
if (text.getText().length() == 0) 
{ 
 Toast.makeText(this, "Please enter a valid number", 
                                Toast.LENGTH_LONG).show(); 
             return; 
} 

float inputValue = Float.parseFloat(text.getText().toString()); 
if (celsiusButton.isChecked())
 { 
text.setText(String 
.valueOf(convertFahrenheitToCelsius(inputValue))); 
celsiusButton.setChecked(false); 
fahrenheitButton.setChecked(true); 
} else { 
text.setText(String 
.valueOf(convertCelsiusToFahrenheit(inputValue))); 
fahrenheitButton.setChecked(false); 
celsiusButton.setChecked(true); 
} 
break; 
} 
} 

 // Converts to celsius 
private float convertFahrenheitToCelsius(float fahrenheit) 
{ 
return ((fahrenheit - 32) * 5 / 9); 
} 

 // Converts to fahrenheit 
private float convertCelsiusToFahrenheit(float celsius)
 { 
return ((celsius * 9) / 5) + 32; 
} 
}
</code></pre>
