Dhiren
Dhiren

Reputation: 159

How to add library of ActionBarSherlock to project?

How to add library of ActionBarSherlock to project? I tried to add library in Android->Library but can't add.

Upvotes: 3

Views: 11748

Answers (8)

user1650415
user1650415

Reputation:

Befor adding ActionBarSherlock library to your project you must Right Click ABS library chose Android Tools -> Add Support Library (do the same thing to your project)

Upvotes: 0

user3252082
user3252082

Reputation:

By following all these steps it works for me.

  1. File->import->Existing Project into Workspace -> Click Next
  2. In Select Root Directory,Browse and find the Library Folder in AndroidBarSherlock Folder.Select the Library .Then Click OK.
  3. Select copy projects into Workspace.Then click Finish.
  4. Then Your Action Sherlock Library is imported.
  5. Right Click Your Project you need to add, Properties -> Android -> Add -> Library -> press OK

Upvotes: 0

Vadim Khasilev
Vadim Khasilev

Reputation: 1

I've solced same issue(red cross icon instead of green tick) folowed advice in this thread: "... The library project must be on the same partition as your project."

Cheers.

Upvotes: 0

Andrey Kolesnikov
Andrey Kolesnikov

Reputation: 56

Had same situation as Dhiren (red cross). Have moved source folder of Sherlock library to my Eclipse workspace folder, imported it again and problem was resolved.

Upvotes: 3

Teshte
Teshte

Reputation: 632

Go the the Sherlock library project in eclipse, and open the project.properties file...Check if android.library=true...if it is false, check it to true :)

Upvotes: 0

madcoderz
madcoderz

Reputation: 4431

Both answers above are close to the solution but not close enough. Here's is how i solved this issue.

1. Install android sdk version 14

2. Import the ActionBarSherlock project you downloaded to Eclipse

3. VERY IMPORTANT do this before step 4 In your project look for android-support-v4.jar If you find it then delete it.

4. Right click on the project you want to use the custom action bar /Properties/Library/Add and add the library project.

If you get an error after step 4 like Jar mismatch! Fix your dependencies then repeat step 3.

Hope this helps others and have a nice day.

Upvotes: 6

RajeshVijayakumar
RajeshVijayakumar

Reputation: 10622

1) Import the Sherlock Library as a project in eclipse IDE.

2) In your target project, Make Right Click on Project Node, SelectProperties-->Android Scroll Down to Library Section Then Select-->Add Button --> A wizard opens select the Sherlock library project and press Ok button Again press Ok button in properties window.

Upvotes: 1

Ahmad
Ahmad

Reputation: 72553

You can do it like this:

Properties -> Android -> add -> ABS

enter image description here

Upvotes: 3

Related Questions