Shailesh K
Lurker
Error: R cannot be resolved to a variable in eclipse juno...Can anyone fix this error..
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.


package com.example.safedrivingpro;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class Last extends Activity {
TextView tv1;
TextView tv2;
TextView tv3,tv4,tv5;
[USER=1021285]@override[/USER]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.last);
TextView tv1= (TextView)findViewById([B]R.id.textView1[/B]); // ERROR LINE: R cannot be resolved..
TextView tv2= (TextView)findViewById([B]R.id.textView2[/B]);// ERROR LINE: R cannot be resolved..
TextView tv3= (TextView)findViewById([B]R.id.textView3[/B]);// ERROR LINE: R cannot be resolved..
TextView tv4= (TextView)findViewById([B]R.id.textView4[/B]);// ERROR LINE: R cannot be resolved..
Bundle b = getIntent().getExtras();
int count=b.getInt("Color1");
int speedcount=b.getInt("Color2");
int rating=b.getInt("Color3");
float maxx=b.getFloat("Color4");
tv2.setText("Number of alerts generated :"+count);
tv3.setText("Maximum speed limit exceeded "+speedcount+" times");
tv4.setText("Driver rating "+rating+"/5");
//tv5.setText("Max Z value "+maxx);
}
}

