ActionBarSherlock不再编译

时间:2013-02-28 07:48:57

标签: java scala actionbarsherlock sbt

我正在使用ActionBarSherlock,Scala,Sbt和android-plugin。一切都在正常工作,突然间它无法编译。我使用git回退到以前工作过的提交,它仍然会给我带来以下12个错误。然后,我记得我的Mac OS更新了,我检查了更新的内容。看来我的Java已经从1.6.0_37更新到1.6.0_41,使用新的OS for OS X 2013-001。

使用此特定版本的其他人有问题吗?我该如何解决这个问题?

> compile
[info] extracting apklib actionbarsherlock-4.2.0.apklib
[info] Wrote /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/scala/com/limeblast/mydeatree/TR.scala
[info] generated 84 source files from 1 apklibs
[info] Compiling 36 Scala sources and 87 Java sources to /Users/Laimiux/scala-rest-client/target/scala-2.9.2/classes...
[warn] /Users/Laimiux/scala-rest-client/src/main/scala/IdeaEditActivity.scala:32: value FILL_PARENT in object LayoutParams is deprecated: see corresponding Javadoc for more information.
[warn]     getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)
[warn]                                        ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockFragment.java:11: OnCreateOptionsMenuListener is not a member of com.actionbarsherlock.app.SherlockFragmentActivity
[error] import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener;
[error]        ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockFragment.java:15: not found: type OnCreateOptionsMenuListener
[error] public class SherlockFragment extends Fragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
[error]                                                           ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockFragment.java:13: OnPrepareOptionsMenuListener is not a member of com.actionbarsherlock.app.SherlockFragmentActivity
[error] import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener;
[error]        ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockFragment.java:15: not found: type OnPrepareOptionsMenuListener
[error] public class SherlockFragment extends Fragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
[error]                                                                                        ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockFragment.java:12: OnOptionsItemSelectedListener is not a member of com.actionbarsherlock.app.SherlockFragmentActivity
[error] import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener;
[error]        ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockFragment.java:15: not found: type OnOptionsItemSelectedListener
[error] public class SherlockFragment extends Fragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
[error]                                                                                                                      ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockListFragment.java:11: OnCreateOptionsMenuListener is not a member of com.actionbarsherlock.app.SherlockFragmentActivity
[error] import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener;
[error]        ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockListFragment.java:15: not found: type OnCreateOptionsMenuListener
[error] public class SherlockListFragment extends ListFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
[error]                                                                   ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockListFragment.java:13: OnPrepareOptionsMenuListener is not a member of com.actionbarsherlock.app.SherlockFragmentActivity
[error] import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener;
[error]        ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockListFragment.java:15: not found: type OnPrepareOptionsMenuListener
[error] public class SherlockListFragment extends ListFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
[error]                                                                                                ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockListFragment.java:12: OnOptionsItemSelectedListener is not a member of com.actionbarsherlock.app.SherlockFragmentActivity
[error] import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener;
[error]        ^
[error] /Users/Laimiux/scala-rest-client/target/scala-2.9.2/src_managed/main/java/com/actionbarsherlock/app/SherlockListFragment.java:15: not found: type OnOptionsItemSelectedListener
[error] public class SherlockListFragment extends ListFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
[error]                                                                                                                              ^
[warn] /Users/Laimiux/scala-rest-client/src/main/scala/NewIdeaActivity.scala:38: value FILL_PARENT in object LayoutParams is deprecated: see corresponding Javadoc for more information.
[warn]     getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)
[warn]                                        ^
[warn] two warnings found
[error] 12 errors found
[error] (Scala-Rest-Client/compile:compile) Compilation failed
[error] Total time: 7 s, completed Feb 27, 2013 11:32:58 PM
> 

1 个答案:

答案 0 :(得分:1)

我不确定是什么原因引起了这个问题,但我修好了。我首先测试了创建常规Android项目并添加ActionBarSherlock。它汇编了!然后,我想创建一个新的Scala Android项目,我添加了ActionBarSherlock。它也汇编了!所以,我复制了所有旧资源,java / scala文件。更新了AndroidManifest。项目编译,构建并再次运行!

似乎我的项目文件夹已损坏或有什么问题。