-3

我正在从 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
4

1 回答 1

0

两种选择:

  1. 您获得 .jar 并将其添加到Libs项目的文件夹中。
  2. 您将 Sherlock 作为 Android 项目添加到 Android Studio 中,然后在您的项目properties中将其添加为库。
于 2013-07-09T13:53:52.277 回答