我有一个小图书馆https://bintray.com/dekalo-stanislav/maven/assertions-android 它可以在 bintray 中找到,但我无法从 jcenter() 中获取它,请参阅下面的详细信息:
1月20日:0.0.1版本发布,并与jcenter同步。
1 月 21 日:我获得批准
Your request to include your package /dekalo-stanislav/maven/assertions-android in Bintray's JCenter has been approved.
现在是 1 月 23 日,jcenter() 上的库不可用
构建.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
// maven {
// url 'https://dl.bintray.com/dekalo-stanislav/maven'
// }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
应用程序/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'ua.com.dekalo.android:assertions-android:0.0.1'
}
如果我尝试构建应用程序:
./gradlew assemble --info
它尝试从 jcenter.bintray.com 获取库:
Resource missing. [HTTP GET: https://jcenter.bintray.com/ua/com/dekalo/android/assertions-android/0.0.1/assertions-android-0.0.1.pom]
Resource missing. [HTTP HEAD: https://jcenter.bintray.com/ua/com/dekalo/android/assertions-android/0.0.1/assertions-android-0.0.1.jar]
结果如下:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find ua.com.dekalo.android:assertions-android:0.0.1.
Required by:
MyApplication2:app:unspecified
但是,如果我直接添加我的存储库,一切都会起作用,请参阅 build.greadle 中的注释 block ,但这不是我想要实现的。
// maven {
// url 'https://dl.bintray.com/dekalo-stanislav/maven'
// }
所以,我的问题是为什么我的库在 jcenter 上不可用以及如何使其在 jcenter 上可见。 我们很乐意提供任何建议,提前谢谢您。
最佳答案
我来自 JFrog 支持团队,根据您的上述问题,我们发现这是由于我们这边的临时问题造成的(已修复)。 我们已通过您的 Bintray 收件箱(在同一包含请求线程上)回复您,并提供了一些附加说明。
如有任何疑问,请随时联系[email protected]
埃兰
关于Android 库发布在 bintray 上,但在 jcenter 上不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41807988/