Reputation: 161
This question has been up a couple of times but still I haven't found an answer that helped me.
1:st one: I cannot find any of my R.Layout.activity_article_detail and other layout xml files through reference. It stopped working after did a "clean project" in Eclipse and tried to build it up again. I've tried removing and adding and removing the .R import but right now it wont find any of them. My layout files doesn't include a Capital letter, are spelled correcly. code:
package martin.larsson.kopingsrssreader;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.NavUtils;
import android.view.MenuItem;
import martin.larsson.kopingsrssreader.R;
public class ArticleDetailActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_article_detail);
Second problem is it cant find my res.menu either. I got 2 files in it. detailmenu.xml and refreshmenu.xml. In both i cant find any of the id tags
<item android:id="@+id/actionbar_markunread"
<item android:id="@+id/actionbar_saveoffline"
<item android:id="@+id/actionbar_refresh"
Does anyone got a clue?
SOLUTION: Uncheck "build automatically" and do a "clean project", and a Eclipse restart.
Upvotes: 0
Views: 1013
Reputation: 3249
Upvotes: 2
Reputation: 3831
if u have an error in any of the resource files R
will show up red unless all Errors are fixed and the project is built
Upvotes: 0