使用 Android Studio 安装 ActionbarSherlock? [英] Installing ActionbarSherlock with Android Studio?

查看:26
本文介绍了使用 Android Studio 安装 ActionbarSherlock?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与许多其他 Android 开发人员一样,我安装了 Android Studio,但如何将 actionbarsherlock 安装到 Android Studio 中?

As many other Android Developers I installed Android Studio, but how do I install actionbarsherlock into Android Studio?

有什么帮助吗?我什至不知道从哪里开始.

Any help? I have no idea where to even start.

推荐答案

我在运行 ActionBarSherlock 时也遇到了问题.我有一个现有的项目,但听起来你只是想要 ABS 从头开始​​.以下是操作步骤的分步说明:

I also had a problem getting ActionBarSherlock running. I had an existing project, but it sounds like you simply want ABS From scratch. Here are step by step instructions of what to do :

1) 在此处下载 ABS:http://actionbarsherlock.com/

1) Download ABS here: http://actionbarsherlock.com/

2) 提取 ABS,您应该在其中有一个名为actionbarsherlock"的目录.将其复制到您的 Android Studio 工作区.并重命名为 ActionBarSherlock(更改大小写) --> 我现在在 \*documents*\Android Workspace\ 下有我的 Android Studio 项目,而不是 \Eclipse Workspace\

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 Workspace\ActionBarSherlock\

可能与您的主要项目一起:

Along with your main project maybe:

\*documents*\Android Workspace\TestProject\

3) 打开 Android Studio 加载您的 TestProject 然后转到 File>导入模块...现在导航到 \*documents*\Android Workspace\ActionBarSherlock\ 下的 ActionBarSherlock单击确定,然后一路完成.它会询问您是否要为新模块设置依赖项(或至少我的),单击确定"

3) Open Android Studio load your TestProject then goto File> Import Module... Now navigate to ActionBarSherlock under \*documents*\Android Workspace\ActionBarSherlock\ 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) 我在这一点上发现的是,在编译时我在 \ActionBarSherlock\test\ 中遇到错误,抱怨 Junit.我只是从项目视图下的 ABS 模块中删除了 \Test\ 目录.右击\test\>删除...

4) What i found at this point is that when compiling I was getting errors in \ActionBarSherlock\test\ complaining about Junit. I simply deleted the \Test\ directory from my ABS Module under project view. Right click \test\ > Delete...

5)您现在应该可以无错误地编译了:)

5) you should now be able to compile without errors :)

希望对某人有所帮助.

但本质上,我需要重新下载一个全新的 ABS,清除我旧项目的 ABS(可能很旧),然后导入模块...

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

这是前一段时间写的,所以我不确定它今天的相关性,但正如 Paulo 在评论中提到的那样尝试这些步骤,并在这里阅读 ABS 线程的一般导入库 --> 如何将库项目添加到Android Studio?

This was written a while ago so I'm not sure how relevant it is today, but as Paulo mentions in the comments try these steps, and also have a read of the general import library to ABS thread over here --> How do I add a library project to Android Studio?

这篇关于使用 Android Studio 安装 ActionbarSherlock?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆