我正在尝试使用gradle和jitpack的一个库的分支。我已经设置了jitpack.io存储库(并且正在使用另一个库的另一个分支)。
我尝试包含的新分支如下:https://github.com/philippeauriach/ChatKit/tree/allow-moving-item
jitpack网站看得很好:https://jitpack.io/#philippeauriach/ChatKit/allow-moving-item-SNAPSHOT
但是当我将compile 'com.github.philippeauriach:ChatKit:allow-moving-item-SNAPSHOT'添加到gradle依赖文件中时,它显示
12:03 Gradle sync failed: Could not find com.github.philippeauriach:ChatKit:allow-moving-item-SNAPSHOT.
Required by:
project :app
Consult IDE log for more details (Help | Show Log)通过使用./gradlew assembleDebug --info,我获得了以下日志:
Resource missing. [HTTP GET: https://jcenter.bintray.com/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-SNAPSHOT.pom]
Resource missing. [HTTP HEAD: https://jcenter.bintray.com/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-SNAPSHOT.jar]
Resource missing. [HTTP GET: https://maven.fabric.io/public/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/maven-metadata.xml]
Resource missing. [HTTP GET: https://maven.fabric.io/public/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-SNAPSHOT.pom]
Resource missing. [HTTP HEAD: https://maven.fabric.io/public/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-SNAPSHOT.jar]
Resource missing. [HTTP GET: http://dl.bintray.com/amulyakhare/maven/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/maven-metadata.xml]
Resource missing. [HTTP GET: http://dl.bintray.com/amulyakhare/maven/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-SNAPSHOT.pom]
Resource missing. [HTTP HEAD: http://dl.bintray.com/amulyakhare/maven/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-SNAPSHOT.jar]
Resource missing. [HTTP GET: https://maven.google.com/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/maven-metadata.xml]
Resource missing. [HTTP GET: https://maven.google.com/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-SNAPSHOT.pom]
Resource missing. [HTTP HEAD: https://maven.google.com/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-SNAPSHOT.jar]
Resource missing. [HTTP GET: https://jitpack.io/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-f906bb2db7-1.pom]
Resource missing. [HTTP HEAD: https://jitpack.io/com/github/philippeauriach/ChatKit/allow-moving-item-SNAPSHOT/ChatKit-allow-moving-item-f906bb2db7-1.jar]这意味着jitpack没有模块。这是从哪里来的?
发布于 2017-08-09 20:43:47
我终于解决了我的问题。检查jitpack构建日志给了我关于这个问题的更多信息:https://jitpack.io/com/github/philippeauriach/ChatKit/jitpack-compile-a17dd57690-1/build.log (jitpack log url是https://jitpack.io/com/github/USER/REPO/TAG/build.log)。
我遗漏了一些文件(特别是jitpack需要的包装器jar文件,如here:Check that you have the Gradle wrapper in your Git repository. If you don’t then create it using the command gradle wrapper and commit it. Also check that the generated gradle-wrapper.jar is not ignored with .gitignore rules.所述)
因此,在我的项目根目录下运行gradle wrapper会生成这些文件:
gradlew
gradlew.bat
gradle/
wrapper/
gradle-wrapper.jar
gradle-wrapper.properties它们需要提交才能使用jitpack。
https://stackoverflow.com/questions/45587659
复制相似问题