添加警告"...的更新版本可用".用于自定义库 [英] Add Warning "A newer version of ..... is available" for custom library

查看:99
本文介绍了添加警告"...的更新版本可用".用于自定义库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚发布了1.2.1版的库,代码在 Github

您可以在图片中看到:

我收到警告",表示我正在使用旧版本的appcompat库,但是我的库没有警告.

我已经通过Bintray将我的图书馆分发给了Maven& jcenter.

有人知道如何在我的图书馆行中启用此注释/警告吗?

解决方案

问题是,无论从哪个库中解析您的库(为jcenter()mavenCentral()或任何其他库),都需要检查最新版本已硬编码同步非常容易到Maven Central .

I've just released my library with version 1.2.1, code is in Github

As you can see in the picture:

I'm getting "Warning" that i'm using old version of appcompat library but there's no warning for my library.

I've distribute my library via Bintray to maven & jcenter.

Does anyone knows how to enable this Note/Warning on my library line?

解决方案

The problem is that regardless of which repository your library is resolved from (being it jcenter(), mavenCentral() or any other repository), the check for the latest version is hardcoded to go to Maven Central.

That's plain wrong, if you ask me, but it is what it is at the moment (we'll work on reporting it as a bug and submitting a pull request). Until it is changed, the only way to guarantee your library will be correctly reported by this intention is to publish your library to Maven Central. Good news are that if your library is already in JCenter, it's very easy to sync it to Maven Central as well.

这篇关于添加警告"...的更新版本可用".用于自定义库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆