Setting ActionBarSherlock Theme for Android app

后端 未结 7 1289
深忆病人
深忆病人 2020-12-01 10:04

READ UPDATE 2 BELOW FOR THE ANSWER

I\'m trying to use ActionBarSherlock in my app. I checked out the 4.0.0 release from the project github repo, bui

7条回答
  •  温柔的废话
    2020-12-01 10:41

    This was happening to me in IntelliJ IDEA. I solved this issue by going to File > Project Structure > Project Settings > Facets > Select actionbarsherlock module in 2nd column > Check the "Library module" checkbox > Apply and OK > Save and Rebuild.

    UPDATE After further review, my original response may be too specific, and will probably only work in certain cases. This error means that the dependencies have not been properly setup. In IntelliJ IDEA, follow these steps to properly setup actionbarsherlock as a module dependency:

    1. Download and extract the actionbarsherlock library from the zip (Note: You only need the “actionbarsherlock” folder)
    2. Copy and paste it alongside your Android project
    3. Open your project in IntelliJ
    4. File > Project Structure > Project Settings > Modules > Add (green ‘+’ above second column) > Import Module > Select actionbarsherlock directory in file browser dialog > OK > Create module from existing sources > Next
    5. Uncheck the “test” folder so it is not added to the project and click “Next”
    6. Under the Libraries tab, android-support-v4 should be checked, click “Next”
    7. Under the Modules tab, actionbarsherlock should be checked, click “Next”
    8. If it asks you to Overwrite actionbarsherlock.iml, choose “Overwrite” and then "Finish" (You should be returned to the Modules section of the Project Structure dialog)
    9. Select the actionbarsherlock module from the second colum and under the Dependencies tab in the third column, check “Export” next to the android-support-v4 library
    10. Almost there!
    11. Now select your project module from the second column, and under the Dependencies tab, click the Add button (green ‘+’ on the far right side of the dialog)
    12. Select Module Dependency and choose actionbarsherlock from the dialog that pops up and press “OK”
    13. Now click “Apply” or “OK” to accept the changes

    That should do the trick.

提交回复
热议问题