简体   繁体   English

Android Studio:如何找到谷歌特定库的最新版本号?

[英]Android Studio : How to find latest version number of google specific libraries?

How to find latest version number of google specific libraries from repositories (jcenter etc..) to include in gradle dependencies in Android Studio.如何从存储库(jcenter 等)中找到谷歌特定库的最新版本号以包含在 Android Studio 的 gradle 依赖项中。

For non google libraries generally I can make a search in jcenter itself.对于非谷歌图书馆,我通常可以在 jcenter 本身中进行搜索。 But not able to search google specific libraries there.但无法在那里搜索谷歌特定的库。

You may take example of following libraries.您可以以以下库为例。

com.android.support:appcompat-v7:25.1.0'
com.android.support:recyclerview-v7:23.3.0' 

Yes as Tim mentioned in the comment Gradle tells you by highlighting particular dependency as a warning.是的,正如 Tim 在 Gradle 通过突出显示特定依赖项作为警告告诉您的评论中提到的那样。

Trick to update dependency with latest version:使用最新版本更新依赖项的技巧:

Let me also share a trick through which you can always include the latest version of the particular dependency.让我也分享一个技巧,通过它您可以始终包含特定依赖项的最新版本。

  1. Replace the version number with only "+" sign.仅用“+”号替换版本号。
  2. Sync gradle同步gradle
  3. Now select + sign and press ALT + ENTER, it will show you drop down menu with an option to select latest version.现在选择 + 符号并按 ALT + ENTER,它将显示下拉菜单,其中包含选择最新版本的选项。

在此处输入图片说明

If you have added a dependency, you can see them by moving the cursor to that library.如果您添加了依赖项,您可以通过将光标移动到该库来查看它们。 It will show you a warning它会向您显示警告

像这样

You can then change to new library and sync your project.然后,您可以更改为新库并同步您的项目。

Another way to use the latest libraries in Android Studio.在 Android Studio 中使用最新库的另一种方法。

Right click your project and choose Open Module Settings.右键单击您的项目并选择打开模块设置。 Project Structure window will appear.将出现项目结构窗口。 Select 'app' from the left pane and choose the 'Dependencies' tab.从左窗格中选择“应用程序”,然后选择“依赖项”选项卡。 Include new library dependency by pressing the + icon.按 + 图标包含新的库依赖项。 Search your needed library in the window opened up.在打开的窗口中搜索您需要的库。 Latest library dependency will appear in the suggestions and you can add them to your project.最新的库依赖项将出现在建议中,您可以将它们添加到您的项目中。

The best way these days is to go to https://maven.google.com , where google now lets you browse all their libraries and see all the versions available, including the latest version.现在最好的方法是访问https://maven.google.com ,谷歌现在可以让你浏览他们所有的库并查看所有可用版本,包括最新版本。 It looks like this:它看起来像这样:

在此处输入图片说明

You can even do a search for a specific library, and then expand/collapse as desired:您甚至可以搜索特定库,然后根据需要展开/折叠:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Android Studio 中查找最新版本的 Kotlin - How to find out the latest version of Kotlin in Android Studio 如何在 Android Studio 中使用最新的 gradle 版本 - How to use the latest gradle version in Android Studio 如何在 android studio 中获取最新版本的库? - How to get latest version of library in android studio? 我在哪里可以找到android studio中最新的gradle版本? - Where can I find latest gradle version in android studio? 在哪里可以找到最新版本的 android studio 中的 r.java - where to find r.java in android studio in latest version Android Studio构建问题Google登录和Firebase最新版本10.2.4 - Android studio build issue Google sign in and Firebase latest version 10.2.4 Google Play服务未在Android Studio中获得最新版本 - Google Play Service not getting updated latest version in Android Studio 如何在android studio 3.2.1最新版本中导入Google Material Design图标? - How to import Google material design icon in android studio 3.2.1 latest version? 我如何知道Android Studio的最新版本的Google Play服务是什么? - How do I know what the latest version of Google Play Services is for Android Studio? Android:如何在android studio中配置FFMPEG最新版本? - Android: How to configure FFMPEG latest version in android studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM