我正在尝试使用maven https://github.com/traex/RippleEffect导入Ripple Effect库。
它说" lib可以在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
有什么想法吗?
答案 0 :(得分:1)
根据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