简体   繁体   中英

How do I find Google Play version?

When I am setting up gradle, I have to add something like:

compile 'com.google.android.gms:play-services:6.1+'

I don't like to use the +, so I can always know which version the project is being compiled with and so I can avoid some surprise bugs.

In order to find the Google Play version I have currently downloaded, I usually go to the library XML file which I can find something like: "6171000", which is the version as an integer.

Is it there a simpler way to figure out the version that I need to write on gradle?

  • cd into your module (eg: app ) dir, and run gradle command line ..\\gradlew -q dependencies --configuration compile . This will resolve the + , and show you exact version being used for your library. See below.

  • Or, if you use Android Studio , when you modify/edit the version (eg: simply delete/add + at the end), Android Studio will show a yellow-bulb action with Replace with specific version , click on it to automatically replace the + with exact version available.

Go to this site: http://gradleplease.appspot.com/#play-services

You can also search for any library (Ex. recyclerview ). This will help you specify the library's latest version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM