gpt4 book ai didi

android - 使用 Maven 构建失败

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:02:46 25 4
gpt4 key购买 nike

我是 Robospice 的新手,在示例项目的目录中运行 mvn install 会出现以下错误:

[ERROR] Failed to execute goal on project robospice-sample-ormlite-content-provider: 
Could not resolve dependencies for project com.octo.android.robospice:robospice-sample-ormlite-content-provider:apk:1.0.0-SNAPSHOT:
The following artifacts could not be resolved:
com.octo.android.robospice:robospice-ormlite-content-provider:jar:1.4.5-SNAPSHOT,
com.octo.android.robospice:robospice-spring-android:jar:1.4.5-SNAPSHOT,
com.tojc.ormlite.android:ormlite-content-provider-compiler:jar:1.0.0-SNAPSHOT:
Could not find artifact com.octo.android.robospice:robospice-ormlite-content
provider:jar:1.4.5-SNAPSHOT -> [Help 1]

我正在使用 Maven 3.1.0知道出了什么问题吗?

尝试通过 m2eclipse 将项目导入到 eclipse,结果出现与 Artifact 丢失相关的错误。

最佳答案

如果您从 pom.xml 文件中的每个依赖项中删除“-SNAPSHOT”文本,它应该会开始工作。 SNAPSHOT 依赖项在任何公共(public)存储库中都不可用。

    <robospice.ormlite.content.provider.version>1.4.5</robospice.ormlite.content.provider.version>
<robospice.spring.android.version>1.4.5</robospice.spring.android.version>
<ormlite.content.provider.version>1.0.0</ormlite.content.provider.version>

您可以在 this public repo 中找到所有可用版本.

编辑:还有另一种选择,这实际上可能是更好的方法(特别是如果您要使用大量样本)。您可以下载the library source code从 Robospice master 分支,运行 mvn install(确保你的 android 模拟器正在运行以进行单元测试)。这将使本地仓库中的 Maven 可以使用最新的快照版本——如果你这样做,原始示例项目将运行,但你仍然需要将示例 pom.xml 中的版本号更新为 1.4.7-SNAPSHOT——这是来自 master 分支的快照的当前版本。

关于android - 使用 Maven 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17901560/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com