Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot add android.support.v7 to my project build path

I am trying to add android-support-v7-appcompat to my project build path:

This is what I have done: Right-click on my own project -> build path -> configure build path -> choose Android on the left column and then click "Add". I choose "android-support-v7-appcompat". This name appears then in the right column of the table, on the left appears the path where the library is located: C:\Program Files\adt-bundle-windows-x86-20131030\sdk\extras\android\support\v7\appcompat. And it has a beautiful green check mark on the left!

I click Apply or Ok.

Then I go to this screen again, but though the path is still on the left in the table, there is a red cross on the left and a question mark, where "android-support-v7-appcompat" should have been. I have done exactly what is described in http://developer.android.com/tools/support-library/setup.html (title "Adding libraries with resources").

Has someone any idea????

like image 233
irmdaen Avatar asked Dec 11 '13 15:12

irmdaen


3 Answers

the way how to preserve "green check mark" after reopen Properties window is putting your own project on the same letter drive, where is located project android-support-v7-appcompat

so if you have it located in C:\Program Files\adt-bundle-windows-x86-20131030\sdk\extras\android\support\v7\appcompat, then you have to move your own project somewhere on drive C:\ (e.g. C:\Users\User\workspace)

this work for me

like image 125
usnul Avatar answered Nov 16 '22 13:11

usnul


Do as below:

Go to File -->Import -->Import the library project into your workspace(select the project exists here C:\Program Files\adt-bundle-windows-x86-20131030\sdk\extras\android\support\v7\appcompat).

Then Right Click on your project-->Select Android --> Add-->Select the library project you have imported.

don't forget to checkmark the library project in Project-->Right Click-->Properties-->Java Build Path--->Order and Export

like image 28
TNR Avatar answered Nov 16 '22 12:11

TNR


  • Remove all of your library projects
  • Do a clean of the project with the dependecies
  • Add the problematic library again
  • Add all of the other libraries
like image 1
Dieguinho Avatar answered Nov 16 '22 14:11

Dieguinho