When I am creating a new android project in eclipse a file named
R.java is supposed to be created automatically which is not happening.
My Ubuntu is 12.04 LTS 64 bit
My Eclipse version is juno for jee SR1 x86_64
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
This is a common Eclipse ADT problem, yet there's not a concrete answer to solve this, there are different ways to aproach this like the following:
1: Clean the project
Project ---> Clean
-according to the
Eclipse ADT plugin developers and contributors:
if you run a clean on the project it should regenerate all the generated java files, namely R.
you should never import
android.R (if you do this, you will find out that this file is shared between all the projects on eclipse, so if you delete or remove the project who has this file in the first place, you will corrupt all the other projects you import the file with).
I've tried this with no results, but you should try all the possible solutions
2: Removing corrupted files
this source has helped me before, you should give it a try
3: Using a different IDE to develop Android apps
AndroidStudio a very good tool to develop even though its in beta release, i never have to solve the
R.java problem because Graddle (a build automation tool) let me know or even solve all the corrupted files that might have my android app
You can download it in here
works in Windows,Mac and Linux and you can even migrate your Eclipse projects to AndroidStudio to continue to work in your android apps
/home/[uName]/(or any sub_dir)
make sure that there aren't any errors in any resource file
make sure that
android:targetSdkVersion="xx" in the
AndroidManifest.xml is typically the android version you had installed.