TextView Cannot Be Resolved
android, textview
Solution
Did you import textview?
import android.widget.TextView;
Problem
Now I know these are fairly common issues, but I'm using a textview that cannot be resolved. I've cleaned the project, import android.widget.TextView, but it continues to flag as unresolved. This is the code I'm using: ``` public void onStart() { super.onStart(); HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet("http://1.php"); HttpResponse response = client.execute(request); // Get the response BufferedReader rd = new BufferedReader (new InputStreamReader(response.getEntity().getContent())); String line = ""; while ((line = rd.readLine()) != null) { TextView.append(line); } } ``` TextView in activity_main: ``` <TextView android:id="@+id/TextView" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10"> </TextView> ``` Any ideas on this please? EDIT: ``` TextView textView = (TextView) findViewById(R.id.TextView1); String line = ""; while ((line = rd.readLine()) != null) { TextView1.append(line); } ``` The end line starting with TextView1 is providing the error stating it cannot be resolved. Just the `TextView1` though, not the entire line. EDIT 28/10/2012: Ok, so the TextView is now working, but in turn, other parts of the code are not. This is a screenshot showing exactly what. I can wrap each of these in a try and catch statement but then the app force closes on my Android device. http://southwestdesign.org.uk/Code.jpg Any ideas on this one please?