【发布时间】:2012-10-24 11:31:52
【问题描述】:
我正在尝试在 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 中的依赖项。
我的问题
为什么我在编译代码时出错?
【问题讨论】:
-
您是否注意到它说...holoeverywhere-library_apklib_1.3.1-SNAPSHOT?而不是 1.3.2
-
@DandreAllison 感谢您的评论。但坦率地说,在浪费了将近 8 天之后,我放弃了使用 Maven。 1. Android 团队没有上传到 Maven Central 2. 你需要安装 Android Maven 插件并将 SDK 复制到 Maven repo,这也因琐碎的原因而失败 3. 从 Maven Central 下载的安全性值得怀疑。我读到 Sonatype 正试图利用从 Maven Central 下载的内容的安全性来赚钱。这比任何优势都更麻烦。而是使用 IntelliJ 下载 Lib 并将其添加为依赖项。 IntelliJ-Idea 也免费为开发者倾注了极大的热情。
标签: android maven actionbarsherlock android-holo-everywhere