Shariq Musharaf
Shariq Musharaf

Reputation: 1003

Android - Eclipse project making and R file error

I'm having issue with Eclipse and I work in android. This issue happens when I create a new project and when I click finish, It auto generates the project without R file and The project creating window doesn't closes and I have to close it. I have many old projects which work fine(Until now) and the issue is only coming when I make a new project. I also get a error in Styles.xml file saying that "Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'". When I press CTRL+RightClick onto R file then it takes me to a window which says "Source Not Found". If you have any solution for this, Please post your answer under this question. Thank you! EDIT: Appcompat error was solved later.

Upvotes: 0

Views: 164

Answers (1)

Wildroid
Wildroid

Reputation: 864

To solve missing R in generated java files, make sure that Android SDK Tools and Android SDK Build-tools are installed and updated in SDK Manager. Then, make sure Eclipse is updated. After this, clean your project and rebuild.

To solve No resource found "...AppCompat...", make sure Android Support Library is installed and updated in SDK Manager. Then, the AppCompat library can be found at:

android-sdk/extras/android/support/v7/appcompat

You need to reference this AppCompat library in your Android project.

Import the library into Eclipse. To do so:

Right click on your Android project. Select properties. Click 'add...' at the bottom to add a library. Select the support library. Finally, Clean and rebuild your project.

Upvotes: 1

Related Questions