user2720828
user2720828

Reputation: 81

Errors in creating a simple android project

I have created few small application few days back using android SDK 4.4.2 API 19. But when I have updated the sdk to 5.0 and API 21 i get the following problems:

Description Resource Path Location Type Project 'appcompat_v7' is missing required source folder: 'gen' appcompat_v7 Build path Build Path Problem

The project cannot be built until build path errors are resolved HOS Unknown Java Problem

The project cannot be built until build path errors are resolved appcompat_v7 Unknown Java Problem

The container 'Android Dependencies' references non existing library '/mnt/devel/home/amulya/workspace/appcompat_v7/bin/appcompat_v7.jar'

In the console I get these errors:

[2014-10-27 11:40:47 - appcompat_v7] WARNING: unable to write jarlist cache file /mnt/devel/home/amulya/workspace/appcompat_v7/bin/jarlist.cache

[2014-10-27 11:40:47 - appcompat_v7] WARNING: unable to write jarlist cache file /mnt/devel/home/amulya/workspace/appcompat_v7/bin/jarlist.cache [2014-10-27 11:40:48 - HOS] /mnt/devel/home/amulya/workspace/appcompat_v7/res/values-v21/styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.

[2014-10-27 11:40:48 - HOS] [2014-10-27 11:40:48 - HOS] /mnt/devel/home/amulya/workspace/appcompat_v7/res/values-v21/styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.

I went through many questions and answers in stackoverflow but i couldn't get rid of this problem. Please do help me. Thanks in advance

Upvotes: 2

Views: 6818

Answers (2)

user3923374
user3923374

Reputation: 44

Here's how I fixed it for me, using Eclipse.

  • Right click on the "appcompat_v7" project, select "Build Project" - Not sure if you have to do this step, but I had so I have included it.
  • Right click on the "appcompat_v7" project, select "Android Tools" > "Add Support Library..."
  • Accept the License, click the "Install" button, and it will download some files.
  • Right click on the "appcompat_v7" project, select "Build Project"
  • You should then be able to build your projects.

Oddly it apparently downloads support library 21.0.2, but I already have this library installed.

Upvotes: 2

Wildroid
Wildroid

Reputation: 864

This occurs when appcompat_v7 dependencies does not match with your project. For example, if certain library needs android-support-v4.jar, make sure that both (project and library) share the same version of the file. You need to update appcompat_v7 as well since you updated the project to SDK 5.0 and API 21.

Upvotes: 1

Related Questions