gpt4 book ai didi

Android:库项目中的 Actionbar Sherlock 错误

转载 作者:搜寻专家 更新时间:2023-11-01 09:05:42 26 4
gpt4 key购买 nike

我按照这些步骤做了完全相同的事情:

http://www.slideshare.net/androidstream/action-bar-sherlock-tutorial

但问题是这个 com_actionbarsherlock 在它的 src 文件夹文件中有很多错误。

大多数(或者不知道是否全部)错误是这样的:

The method onPreparePanel(int, View, Menu) of type _ActionBarSherlockTrojanHorse must override a superclass method

图书馆 list 有这个:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.actionbarsherlock"
android:versionCode="90"
android:versionName="4.1.0" >

<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="14" />

</manifest>

项目构建目标是 API 14

我的项目 list 有这个:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.sherlock"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="10" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Sherlock">
<activity
android:name=".SherlockActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

项目构建目标是 API 10

如何解决这个问题??

谢谢

最佳答案

引用自 a blog post from this week :

There are two ways to fix this.

For an individual project, you can go into Project > Properties, choose the “Java Compiler” category on the left, and change the value in the “Compiler compliance level” drop-down. Sometimes, this will be disabled, because you are using your workspace-level setting and are not overriding it at the project level. Sometimes, though, the project might be set to override it at the project level and have it set to 1.5. If you would prefer to not override it on a project where it is overridden, you can uncheck the “Enable Project Specific Settings” checkbox at the top of the dialog.

For your entire workspace, you can go to the Preferences window and choose Java > Compiler from the category tree on the left. Here, you will see another “Compiler compliance level” drop-down, one that controls the default for all of your projects.

Maintaining a consistent 1.6 compiler compliance level will clear up these @Override complaints.

关于Android:库项目中的 Actionbar Sherlock 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12018080/

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