如何将库项目SherlockBar添加到Android Studio?

时间:2013-07-09 13:33:28

标签: android actionbarsherlock android-studio

我从Eclipse导入项目。导入后,我收到许多类似的错误:

 - java: ...\ActionBarSherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\ActionModeAssert.java:17: cannot find symbol
symbol  : method isNotNull()
location: class org.fest.assertions.api.com.actionbarsherlock.view.ActionModeAssert
 - java: ...\ActionBarSherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\ActionModeAssert.java:11: cannot find symbol
symbol: class AbstractAssert
 - java: ...\ActionBarSherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\ActionModeAssert.java:17: cannot find symbol
symbol  : method isNotNull()
location: class org.fest.assertions.api.com.actionbarsherlock.view.ActionModeAssert
 - java: ...\ActionBarSherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\ActionModeAssert.java:18: cannot find symbol
symbol  : variable actual
location: class org.fest.assertions.api.com.actionbarsherlock.view.ActionModeAssert
java: ...\ActionBarSherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\ActionModeAssert.java:25: cannot find symbol
symbol  : method isNotNull()
location: class org.fest.assertions.api.com.actionbarsherlock.view.ActionModeAssert
 - java: ...\ActionBarSherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\ActionModeAssert.java:26: cannot find symbol
symbol  : variable actual
location: class org.fest.assertions.api.com.actionbarsherlock.view.ActionModeAssert
 - java: ...\ActionBarSherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\ActionModeAssert.java:27: cannot find symbol
symbol  : method assertThat(android.view.View)
location: class org.fest.assertions.api.com.actionbarsherlock.view.ActionModeAssert

1 个答案:

答案 0 :(得分:0)

两个选项:

  1. 您将获得.jar并将其添加到项目的Libs文件夹中。
  2. 您将Sherlock作为Android Porject添加到Android Studio中,在项目properties中,您将其添加为库。