Seems there's a lot of general issues on importing modules to Android Studio
, not just ActionBarSherlock
, this answer might also address those. (However the last steps relating to junit are particular to abs
)
The steps below allowed me to get ActionBarSherlock
running with no issues.
1) Download latest ABS here: http://actionbarsherlock.com/
2) Extract ABS you should have a directory in there called "actionbarsherlock". Copy that to your Android Studio workspace. and rename to ActionBarSherlock (changed casing)
-- > I now have my Android Studio Projects under *documents*Android Workspace
As opposed to Eclipse Workspace
So you should now have something like :
*documents*Android WorkspaceActionBarSherlock
Along with your main project maybe:
*documents*Android WorkspaceTestProject
3) Open Android Studio load your TestProject
then goto File> Import Module..
. Now navigate to ActionBarSherlock under *documents*Android WorkspaceActionBarSherlock
Click Ok and next all the way to finish. It will ask if you want to set a dependancy to the new Module (or at least mine did) click OK
4) at this point when compiling I was getting errors in ActionBarSherlockest
complaining about Junit
. I simply deleted the Test
directory from my ABS Module under project view. Right click est > Delete...
. You could also include the junit jar file but I don't think its necessary
5) you should now be able to compile without errors
Hopefully that helps someone.
Essentially though, I needed to re-download a completely fresh ABS, expunge my old project's ABS (which was probably quite old) then Import Module...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…