gpt4 book ai didi

java - 无法使用maven导入库

转载 作者:行者123 更新时间:2023-12-01 10:23:27 24 4
gpt4 key购买 nike

我正在尝试使用 maven https://github.com/traex/RippleEffect 导入 Ripple Effect 库.

它说“该库在 Maven Central 上可用,请使用 Gradle 找到它”。我不知道 Gradle 是什么,它的信息 ( http://gradleplease.appspot.com/#rippleeffect ) 根本没有帮助我。

我找到了如何使用maven导入它。我将此依赖项添加到我的 POM 中:

<dependency>
<groupId>com.github.traex.rippleeffect</groupId>
<artifactId>library</artifactId>
<version>1.3</version>
</dependency>

并确保我有 Maven 中央存储库:

<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<releases>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

但是,当我尝试运行该项目时,它显示:

Failed to execute goal on project ProjectName: Could not resolve dependencies for project lt.adnera:ProjectName:apk:0.0.1-SNAPSHOT: Failure to find com.github.traex.rippleeffect:library:jar:1.3 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced 

有什么想法吗?

最佳答案

根据http://repo1.maven.org/maven2/com/github/traex/rippleeffect/library/1.3/library-1.3.pom包装是aar所以没有jar可以下载。尝试:

<dependency>
<groupId>com.github.traex.rippleeffect</groupId>
<artifactId>library</artifactId>
<version>1.3</version>
<type>aar</type>
</dependency>

其他信息:http://simpligility.github.io/android-maven-plugin/aar.html

关于java - 无法使用maven导入库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35453132/

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