Reputation: 11
I am using eclipse and the R.java
file is not being generated. I understand from other discussions that this may be a problem due to an incorrect layout content. Here is my layout file generated by the SDK. I am not sure what the error is.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/first_android_app" />
</RelativeLayout>
Upvotes: 1
Views: 995
Reputation: 2517
Here is your solution:
Open a terminal window and type
sudo apt-get install ia32-libs
even if you are using a 64-bit os, this will again help you. It worked perfectly for me.
Upvotes: 0
Reputation: 2895
Reasons for missing R.java could be
Tip: Look at the error in the console and see where does it refer !!
Fact: Cleaning the project does not solve the problem always
Upvotes: 0
Reputation: 167
Please see your resource file there will be some error in your XML file or name of images in capital latter .once its fix then clean the project and run.
Upvotes: 1
Reputation: 1185
I don't see any mistakes here, try to clean and restart Eclipse. It could also be that you have imported files with capital letters or any other characters that are not supported. Please be more clear because this is not going to help you out. What else did you do before this problem occured? What is the error message you see?
Upvotes: 0
Reputation: 2587
Try clean and build or use IntelliJ IDEA for Android developing :)
Upvotes: 0