• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps R cannot be resolved can anyone fix this friends plse....

Hi @Shailesh K, and welcome to Android Forums :)

I've moved your question into the Application Development subforum so that fellow developers can assist you. :thumbsupdroid:

In the meantime, some additional information would be helpful. If you could share a snippet of the code you're having issues with that would be great. :)

You can wrap it in [code=java]...[/code] tags to preserve formatting and enable syntax highlighting.
 
Ok Thank you. Here is the code..

Java:
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);
      
    }

}
 
Last edited by a moderator:
I added the code tag for you to make it a bit prettier. :)

I'm afraid that's about all I can do, though, since I'm not a developer. Hopefully someone will be able to assist shortly. :D
 
If you already did Project > Clean, then look at all your xml code. That's where I would get this error and wouldn't be able to run the app. Even though Eclipse may say the xml is good, there may still be an error.
 
Back
Top Bottom