0

Androidプロジェクトを構築するために、Android mavenプラグインでMavenを使用しています。

Maven を使用して ActionBarSherlock の依存関係を追加しようとしています。

<dependency>
  <groupId>com.actionbarsherlock</groupId>
  <artifactId>actionbarsherlock</artifactId>
  <version>4.2.0</version>
  <type>apklib</type>
</dependency>

pom.xml コンパイラのバージョンを 1.6 に指定しました

<artifactId>maven-compiler-plugin</artifactId>
  <configuration>
  <source>1.6</source>
  <target>1.6</target>
</configuration>

Maven の正しいバージョンの Android ライブラリに依存しています。

<dependency>
  <groupId>com.google.android</groupId>
  <artifactId>android</artifactId>
  <version>4.1.1.4</version>
  <scope>provided</scope>
</dependency>

私は Android の API レベル 16 を使用しています。

エラーの代表的な部分は次のとおりです。

\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'.
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'.
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar'.
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid'.
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid.Inverse'.
    etc...
4

1 に答える 1

4

android-maven-plugin のプラットフォーム バージョンを宣言していることを確認してください。

<plugin>
    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
    <artifactId>android-maven-plugin</artifactId>
    <version>3.4.0</version>
    <configuration>
        <sdk>
            <platform>16</platform>
        </sdk>
    </configuration>
</plugin>
于 2012-11-16T05:17:46.307 に答える