0

I am trying to import a program file for android app. But having issues with setting up ActionBarSherlock giving me errors. I am using a MAC with IntelliJ 12 CE, Android SDK, Java, and 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
4
  • You really need to say what the errors are, and show your code. Commented Jun 2, 2013 at 14:59
  • We can't guess what errors you are getting.. :/ Commented Jun 2, 2013 at 14:59
  • Check this stackoverflow.com/a/6328550/786337 Commented Jun 3, 2013 at 6:10
  • Thanks for the help Tarun I was missing the JUnit file I added it to the class path works fine. Commented Jun 3, 2013 at 17:33

3 Answers 3

1

You can tell intellJ not to run tests:

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

Remove tests from the right column.

Sign up to request clarification or add additional context in comments.

Comments

0

If you are having problem on importing ActionBarSherlock to your project then you can import it this way Right click your project --> click on android ---> click on add and add the actionbarsherlock and click on ok and then apply and again ok if it gives the jar mismatch error delete the android supportv4 library in your project and then clean it.

Comments

0

This is applicable for Intellij Idea

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

Select the base directory of action bar sherlock library.

1 Comment

I have tried this but nothing is working! In the project under library projects it shows actionbarsherlock 4.2.0 but I still get error. I added it to the google API 4.0 and other ones like 2.2 etc. still nothing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.