[英]Maven Dependency Error in pom.xml
我在android中基于Maven的项目上工作,我没有使用过Maven的任何经验。 目前,我正在尝试执行Maven + robospice示例https://github.com/octo-online/RoboSpice-samples/tree/release/robospice-sample-spring-android 。 我在依赖项上遇到了一个奇怪的依赖项错误“缺少工件com.octo.android.robospice:robospice-spring-android:jar:1.4.5-SNAPSHOT”
<dependency>
<groupId>com.octo.android.robospice</groupId>
<artifactId>robospice-spring-android</artifactId>
<version>${robospice.spring.android.version}</version>
</dependency>
变量{robospice.spring.andriod.version}的值为1.4.5-SNAPSHOT 。 完整的pom.xml可以在这里https://github.com/octo-online/RoboSpice-samples/blob/release/robospice-sample-spring-android/pom.xml 。
我已经执行了mvn全新安装,我也更新了mvn更新项目,但此错误仍然存在。 请帮助我修复它。
谢谢,
您应该使用的解决方案是:
<robospice.spring.android.version>1.4.6</robospice.spring.android.version>
代替:
<robospice.spring.android.version>1.4.5-SNAPSHOT</robospice.spring.android.version>
原因似乎很简单,该示例可能已过时。 因为已经有更高版本正式发布了。 您可以在官方Maven中央存储库上看到它: http : //mvnrepository.com/artifact/com.octo.android.robospice/robospice-spring-android
作为背景。 Maven使用版本控制的方式是,您可以仅通过在pom.xml文件中进行描述来检索应用程序所依赖的库(依赖项)。 稍后从maven存储库(默认情况下为maven中央存储库)下载这些文件。 有关完整信息,请参见: http : //maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
我在Maven中央存储库中看不到任何带有该版本1.4.5-SNAPSHOT的jar。 请尝试使用1.4.5版
欲了解更多信息,请点击这里
http://search.maven.org/#browse|-1465358918
谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.