Add Warning “A newer version of … is available” for custom library

不羁岁月 提交于 2019-12-06 12:59:33

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.

As Sneh Pandya pointed out. This is a setting you can enable.

In Android studio 2.3.1 you can enable this if you go to File --> Settings --> Editor --> Inspections. You can than search for library and enable the "Newer Library Version Available "lint-check. This will check for for newer versions of any MavenCentral dependencies. This will however slow down your builds.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!