问题导入项目进入Android的工作室就ActionBarSherlock [英] Problems importing project into Android Studio regarding ActionBarSherlock

查看:322
本文介绍了问题导入项目进入Android的工作室就ActionBarSherlock的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是其他任何人有问题导入项目 ActionBarSherlock ? 我一共有100个错误和17警告有。这的Eclipse 完美。我跟着步骤来创建摇篮建立文件。直到我试图建立的项目目前还没有导入错误。

Is anyone else having problems importing a project with ActionBarSherlock? I have a total of 100 errors and 17 warnings. This worked perfectly in Eclipse. I followed the steps to create a Gradle build file. There were no import errors until I tried to build the Project.

我也尝试重新下载新的ABS和替换到我的项目。

I also tried re-downloading ABS fresh and replace into my project.

有没有已知问题ABS和的IntelliJ ? (这当然Android的工作室现在的基础)

Were there known issues with ABS and IntelliJ? (which of course Android Studio is now based)

下面是一些错误,我所看到的:

Here are a few errors I'm seeing:

        java: ...
        Workspace/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java:4: cannot find symbol
        symbol  : class Fragment
        location: package android.support.v4.app

        java: ...  Workspace/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java:4: cannot find symbol
        symbol  : class ListFragment
        location: package android.support.v4.app

        java: ...
        Workspace/ActionBarSherlock/src/com/actionbarsherlock/widget/SuggestionsAdapter.java:33:
        package android.support.v4.widget does not exist

任何帮助真的AP preciated

Any help really appreciated

编辑:好像不存在使用标准的IntelliJ IDEA没有问题。许多导游在网上与ABS设置它。另外,作为杰克所提到的,他实际上是在发展的IntelliJ的事情

Seems there are no issues using Standard IntelliJ IDEA. Many guides online for setting it up with ABS. Also as Jake mentioned, he's actually been developing the thing in IntelliJ

下面是一个例子指南: <一href="http://android-wtf.com/2012/09/how-to-configure-actionbarsherlock-with-intellij-idea/">http://android-wtf.com/2012/09/how-to-configure-actionbarsherlock-with-intellij-idea/

Here is an example guide: http://android-wtf.com/2012/09/how-to-configure-actionbarsherlock-with-intellij-idea/

不过,我仍然不能确定为什么它不工作在Android的工作室

However, I'm still unsure why its not working in Android Studio

EDIT2:在下面回答的解决方案。简而言之,(我下载 ABS 最新版本,提取,删除了旧版本的 ABS 从我的项目,然后文件&gt;导入模块... 导入 actionbarsherlock 目录到我现有的项目铌,在我的具体情况我一个问题,JUnit的编译错误,并删除\测试\的JUnit \)需要

solution in answer below. In Short: (I downloaded abs latest version, extracted, deleted the old version of abs from my project, then file > import module... to import actionbarsherlock directory into my existing project. Nb, in my particular case I had an issue with junit compilation error and needed to delete \test\junit\ )

推荐答案

似乎有很多的一般性问题有关导入模块 Android的工作室,而不仅仅是 ActionBarSherlock ,这个答案也可能会处理这些。 (但与JUnit的最后一个步骤是特别 ABS

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)

的步骤让我获得 ActionBarSherlock 没有问题运行。

The steps below allowed me to get ActionBarSherlock running with no issues.

1)点击这里下载最新的ABS: http://actionbarsherlock.com/

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

2)摘录ABS你应该在有一个叫做actionbarsherlock。复制到Android Studio工作空间。并重新命名为 ActionBarSherlock(改变外壳) - >现在我有我的下 Android的工作室项目\ *文件* \ Android的工作区\ 相对于 \ Eclipse工作区\

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 :

\ *文件* \ Android的工作区\ ActionBarSherlock \

随着您的主项目可能:

\ *文件* \ Android的工作区\ TestProject的\

3)打开Android的工作室加载你的 TestProject的然后转到文件&gt;导入模块.. 。现在在导航到ActionBarSherlock \ *文件* \ Android的工作区\ 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错误\测试\ 的Junit 。我只是从在项目视图我的ABS模块删除 \测试\ 目录。 右键点击\测试\&GT;删除... 。你也可以包括JUnit的JAR文件,但我不认为它必要

4) at this point 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.... You could also include the junit jar file but I don't think its necessary

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

这篇关于问题导入项目进入Android的工作室就ActionBarSherlock的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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