如何检查是否依赖的gradle有新版本 [英] How to check if gradle dependency has new version

查看:433
本文介绍了如何检查是否依赖的gradle有新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android的工作室,当我使用 + 版本号(如 com.android.support:recyclerview-v7:21。+ )我得到避免使用+版本号的警告。当我使用一个特定的版本号我不能总是使用最新版本。我有一个很大的依赖性在我的项目。我如何检查是否依赖有一个更新的版本?是否有一个Android Studio插件 - 或者像纳─通知我的时候是有依赖性的新版本?

In Android Studio when I use + in version number (like com.android.support:recyclerview-v7:21.+) I get "Avoid using + in version numbers" warning. When I use a specific version number I can't always use the latest version. I have a lot of dependencies in my project. How do I check if a dependency has a newer version? Is there an Android Studio plugin -or something like that- to notify me when there is a newer version of a dependency?

编辑:
Android的工作室凸显了陈旧的Andr​​oid支持库和谷歌播放服务。但这不适用于其他自定义库。

Android studio highlights the outdated android support libraries and Google play services. But this is not available for other custom libraries.

推荐答案

在做谷歌经过一番研究,我发现这不是一个内置功能。但是有一个gradle这个第三方插件来做到这一点:<一href=\"https://github.com/ben-manes/gradle-versions-plugin\">https://github.com/ben-manes/gradle-versions-plugin

After doing some research on Google, I've found that it is not a builtin feature. However there is a gradle 3rd-party plugin to do that: https://github.com/ben-manes/gradle-versions-plugin

编辑:对于支持库​​(com.android.support)的依赖,Android的工作室突出了一个是不是最新的,让你提高到最新版本,只需点击。但是,你需要有支持Android资源库和Android的支持库是最新的。

For support library (com.android.support) dependencies, Android studio highlights the one that are not up to date and let you increase to the latest version with just a click. However, you need to have "Android support repository" and "Android support Library" up to date.

这篇关于如何检查是否依赖的gradle有新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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