There are plenty of references on stack overflow about R not resolving. I seem to have tried everything recommended. I've clicked Android 4.4 in the build path. There is no "import Android.R" for me to remove. The layout xml file does not currently have any errors. I've imported package.name.R (with my actual package name). I have checked for updates and found none. This is a fresh install of Eclipse and the Android SDK\ADT plugin as of today. Still, nothing works. I can't get a R file in my gen folder.
Let me tell you what I did and see if there is some strange setting I missed. I'm doing this on Eclipse Keplar on the Mac.
File->New->Project
Select Android Application Project and hit Next.
Set Application Name to stacktest and hit Next.
Not checked:
Create custom launcher icon
Mark this project as a library
Add project to working sets
Checked:
Create activity
Create Project in Workspace
Select Next.
Create activity is checked and Blank Activity is selected. Select Next. Then select Finish.
I now have two errors relating to "R cannot be resolved to a variable" in MainActivity.java, for R.layout.activity_main and R.menu.main
Cleaning the project does nothing here. When I try to generate a javadoc I get this long list of problems:
oading source files for package com.example.stacktest... Constructing Javadoc information... /Users/mmarino3/Documents/workspace/stacktest/src/com/example/stacktest/MainActivity.java:3: package android.os does not exist import android.os.Bundle; ^ /Users/mmarino3/Documents/workspace/stacktest/src/com/example/stacktest/MainActivity.java:4: package android.app does not exist import android.app.Activity; ^ /Users/mmarino3/Documents/workspace/stacktest/src/com/example/stacktest/MainActivity.java:5: package android.view does not exist import android.view.Menu; ^ /Users/mmarino3/Documents/workspace/stacktest/src/com/example/stacktest/MainActivity.java:7: cannot find symbol symbol: class Activity public class MainActivity extends Activity { ^ /Users/mmarino3/Documents/workspace/stacktest/src/com/example/stacktest/MainActivity.java:10: cannot find symbol symbol : class Bundle location: class com.example.stacktest.MainActivity protected void onCreate(Bundle savedInstanceState) { ^ /Users/mmarino3/Documents/workspace/stacktest/src/com/example/stacktest/MainActivity.java:16: cannot find symbol symbol : class Menu location: class com.example.stacktest.MainActivity public boolean onCreateOptionsMenu(Menu menu) {
I am having the same problem in any and all android projects I create. Anyone know what the problem could be?