简体   繁体   English

动作栏Sherlock编译错误

[英]Action Bar Sherlock Compiling Error

I am trying to import a program file for android app. 我正在尝试为Android应用程序导入程序文件。 But having issues with setting up ActionBarSherlock giving me errors. 但是在设置ActionBarSherlock时遇到问题,这给了我错误。 I am using a MAC with IntelliJ 12 CE, Android SDK, Java, and Action Bar Sherlock. 我将MAC与IntelliJ 12 CE,Android SDK,Java和Action Bar Sherlock一起使用。 How do I set it up to not get errors? 我如何设置它不会出现错误?

java: /library-projects/actionbar-sherlock-4.2.0/test/com/actionbarsherlock/internal/ManifestParsingTest.java:3: package org.junit does not exist

java: /library-projects/actionbar-sherlock-4.2.0/test/com/actionbarsherlock/internal/ManifestParsingTest.java:6: package org.hamcrest does not exist

java: /library-projects/actionbar-sherlock-4.2.0/test/com/actionbarsherlock/internal/ManifestParsingTest.java:6: static import only from classes and interfaces

java: /library-projects/actionbar-sherlock-4.2.0/test/com/actionbarsherlock/internal/ManifestParsingTest.java:7: package org.junit does not exist

java: /library-projects/actionbar-sherlock-4.2.0/test/com/actionbarsherlock/internal/ManifestParsingTest.java:10: cannot find symbol
symbol  : class Test
location: class com.actionbarsherlock.internal.ManifestParsingTest

You can tell intellJ not to run tests: 您可以告诉intellJ不要运行测试:

File -> Project Structure -> Modules -> actionbarsherlock -> Source

Remove tests from the right column. 从右列中删除测试。

如果您在将ActionBarSherlock导入到项目时遇到问题,则可以这种方式导入它右键单击您的项目->单击android --->单击添加并添加actionbarsherlock,然后单击确定,然后再应用,如果确定它给出了jar不匹配错误,请删除项目中的android supportv4库,然后将其清理。

This is applicable for Intellij Idea 这适用于Intellij Idea

File -> Project Structure -> Modules -> Import/New Module -> 

Select the base directory of action bar sherlock library. 选择操作栏夏洛克库的基本目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM