HoloEverywhere方法不会覆盖或实现超类型的方法

时间:2012-10-24 11:31:53

标签: android maven actionbarsherlock android-holo-everywhere

我正在尝试在IntelliJ中使用HoloEverywhere 1.3.2和Maven构建系统。以下是我的AndroidManifest.xml

中的代码
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.xyz.holocheck"
          android:versionCode="1"
          android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8"
              android:targetSdkVersion="16"/>
    <application android:label="@string/app_name"
                 android:icon="@drawable/ic_launcher"
                 android:theme="@style/Holo.Theme.Sherlock">
        <activity android:name="HoloActivity"
                  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>

和HoloActivity的代码如下

public class HoloActivity extends SActivity {
    /**
     * Called when the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

当我编译代码时,我得到以下错误

C:\Users\abc\IdeaProjects\HoloCheck\target\unpack\apklibs\com.github.christopheversieux_holoeverywhere-library_apklib_1.3.1-SNAPSHOT\src\com\WazaBe\HoloEverywhere\sherlock\SActivity.java:[322,1] method does not override or implement a method from a supertype
[ERROR] C:\Users\abc\IdeaProjects\HoloCheck\target\unpack\apklibs\com.github.christopheversieux_holoeverywhere-library_apklib_1.3.1-SNAPSHOT\src\com\WazaBe\HoloEverywhere\sherlock\SExpandableListActivity.java:[323,1] method does not override or implement a method from a supertype
[ERROR] C:\Users\abc\IdeaProjects\HoloCheck\target\unpack\apklibs\com.github.christopheversieux_holoeverywhere-library_apklib_1.3.1-SNAPSHOT\src\com\WazaBe\HoloEverywhere\sherlock\SListActivity.java:[322,1] method does not override or implement a method from a supertype
[ERROR] C:\Users\abc\IdeaProjects\HoloCheck\target\unpack\apklibs\com.github.christopheversieux_holoeverywhere-library_apklib_1.3.1-SNAPSHOT\src\com\WazaBe\HoloEverywhere\sherlock\SPreferenceActivity.java:[323,1] method does not override or implement a method from a supertype

我也在使用ActionbarSherlock并将其作为依赖项添加到pom.xml中。

我的问题

为什么我在编译代码时遇到错误?

1 个答案:

答案 0 :(得分:0)

这意味着SActivity类中没有onCreate()方法。请检查一下。