Can someone tell me the steps on how to import the SherlockFragmentActivity.java and ActionBarSherlock folder correctly? I am not exactly sure how to do it and am getting ma
You get errors because you already have android-support-v4.jar
in the /libs/
directory of your project, but the ActionBarSherlock
project already includes this library and so a conflict occurs.
To fix this delete android-support-v4.jar
from your project then go to Project > Clean
.
Follow the steps below and i am 100% sure that you will be successful in importing the android Action Bar Sherlock library.
The first thing you have to do, is to download the library from http://actionbarsherlock.com? . After this unzip/untar it.
The folder that you get will contain a number of sub-folders and files. Your action bar sherlock library is in the folder “actionbarsherlock”. Now, rename the folder “actionbarsherlock” to “ActionBarSherlockLib”.
Now go to Eclipse and add the ABS(Action Bar Sherlock )-library as an Android project. Do not use Eclipse’s import tool to import the ActionBarSherlock library – it would not work immediately and you would have to fix some settings. Instead, create a new project as explained in the next step.
Open File -> New -> Project -> Android Project From Existing Code. Select this and click next.
In the next screen eclipse will ask you to browse the root directory. You have to select the root folder which contains all the files and folders that you had initially unzipped. After selecting the correct root folder, eclipse suggests a list of projects to create.
You have to only check “ActionBarSherlockLib” and uncheck the rest.
Check 'copy projects into workspace' and click finish.
You are now a champion and have successfully imported the action bar sherlock library into eclipse. Congrats.
You have a little tutorial on this site: tutorial
One thing you should pay attention to is the console. You might get permission issues if your Android SDK is installed in Program Files (x86). What you would need to do is then make sure you change the permissions so that apps can alter that folder. I know I had that problem and it took me forever to find because I didn't pay attention to the console.