I know this question has been asked before but I am at my witts end with this. I have just created a new project and getting this error.
Ofcourse the R.java file is not being generated.
I am using JRE7 android 4.2.2
package com.example.myfirstapp;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
As we can see no R import in the mainactivity class
Lets take a look at the untouched manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.myfirstapp.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
nothing there that looks out of place. I have tried multiple close project open project. clean and builds.
None of the res are in uppercase and I have experimented with the project properties java build path order and export. Under libaries I have 3 different android libaries:
android 4.2.2 android Private Libaries android dependencies
THis is making me start to long for C++ :)
Rfile import if your package name and folder are same. Make suregenfolder contains a folder with your package name andR.javain it.