Importing Actionbarsherlock into eclipse

后端 未结 4 755
梦谈多话
梦谈多话 2020-12-30 16:38

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

相关标签:
4条回答
  • 2020-12-30 17:00

    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.

    0 讨论(0)
  • 2020-12-30 17:08

    Follow the steps below and i am 100% sure that you will be successful in importing the android Action Bar Sherlock library.

    1. The first thing you have to do, is to download the library from http://actionbarsherlock.com? . After this unzip/untar it.

    2. 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”.

    3. 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.

    4. Open File -> New -> Project -> Android Project From Existing Code. Select this and click next.

    5. 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.

    6. You have to only check “ActionBarSherlockLib” and uncheck the rest.

    7. Check 'copy projects into workspace' and click finish.

    8. You are now a champion and have successfully imported the action bar sherlock library into eclipse. Congrats.

    0 讨论(0)
  • 2020-12-30 17:11
    1. Extract ActionBarSherlock project.
    2. Add the project in Eclipse like an android 4.0+ project.
    3. Then open you working project preferences and in Android section include de ActionBarSherlock project as library.
    4. Use what you need from ActionBarSherlock project.

    You have a little tutorial on this site: tutorial

    0 讨论(0)
  • 2020-12-30 17:14
    • Extract ActionBarSherlock
    • Open Eclipse and select File > Import
    • From there, select the library folder within the extracted ActionBarSherlock folder
    • Check "Copy projects into workspace"
    • Right click on the new project that should be named "library" go to Android Tools > Add Support Library
    • Follow those steps and you should be all set!

    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.

    0 讨论(0)
提交回复
热议问题