ActionBarSherlock Maven依赖项 [英] ActionBarSherlock maven dependency
问题描述
我一直在尝试使用
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>library</artifactId>
<version>4.2.0</version>
</dependency>
。现在,除了我的styles.xml文件之外,其他所有东西都工作正常吗?我究竟做错了什么。以下是完整的pom.xml
in my pom.xml file. Now this works except for my styles.xml file, where it does not seem to the abs styles, but everything else works fine ? What am i doing wrong. Below is the full pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xyz</groupId>
<artifactId>abc</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>abc Android Application</name>
<dependencies>
<dependency>
<groupId>org.springframework.android</groupId>
<artifactId>spring-android-rest-template</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.8</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.0.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>16</platform>
</sdk>
</configuration>
</plugin>
</plugins>
</build>
</project>
推荐答案
ActionBarSherlock是一个库项目,这意味着您需要添加一个< type> apklib< / type>
到Maven依赖声明。
ActionBarSherlock is a library project which means you need to add a <type>apklib</type>
to the Maven dependency declaration.
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<version>4.2.0</version>
<type>apklib</type>
</dependency>
(请注意,我还更改了 artifactId
到'actionbarsherlock')
(Note that I've also changed the artifactId
to 'actionbarsherlock')
为此,您需要拥有 android-maven-
。看来您已从粘贴的< extensions> true< / extensions>
引用的插件 pom.xml
完成此要求。
In order to do this, you need to have the android-maven-plugin
referenced with <extensions>true</extensions>
. It looks you have this requirement completed already from your pasted pom.xml
.
这篇关于ActionBarSherlock Maven依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!