gpt4 book ai didi

java - ActionBarSherlock 不再编译

转载 作者:行者123 更新时间:2023-12-01 14:48:34 28 4
gpt4 key购买 nike

我正在使用 ActionBarSherlock、Scala、Sbt 和 android-plugin。一切都工作正常,但突然无法编译。我使用 git 回退到以前有效的提交,但它仍然会抛出以下 12 个错误。然后,我想起我的 Mac 操作系统更新了,我检查了更新的内容。我的 Java 似乎已从 1.6.0_37 更新到 1.6.0_41,并使用 OS X 2013-001 的新 Java。

使用此特定版本的其他人是否遇到问题?我应该如何解决这个问题?

> 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
>

最佳答案

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

似乎我的项目文件夹已损坏或类似的情况。

关于java - ActionBarSherlock 不再编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15130175/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com