如果新版本可用,Android将对自定义库启用警告 [英] Android enable warning for custom library if new version is available

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

问题描述

例如,使用支持库,如果支持库未使用最新版本,Android Lint将显示警告。但是,当我创建自己的库并通过Bintray发布它时,使用旧版本时不会显示警告。有没有办法为自定义库启用此行为?

With the support libraries, for example, Android Lint will show a warning if the library is not using the latest version. However, when I created my own library and published it through Bintray, no warning is displayed when using an older version. Is there any way to enable this behavior for custom libraries as well?

推荐答案

您可以在Android Studio中执行以下操作。 / p>

You can do the following in your Android Studio.


设置>编辑器>检查>可用较新的库版本

Settings > Editor > Inspections > "Newer Library Versions Available"

这将对您的gradle依赖项进行检查。但是,请记住,这可能会减慢您的编译时间。另一个选择是

This will introduce a lint check on your gradle dependencies. But, remember this may slowdown your compile time. Another alternative is,


分析>按名称运行检查>可用的新库版本

Analyze > "Run Inspection By Name" > "Newer Library Versions Available"

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

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