Reputation: 14294
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?
Upvotes: 0
Views: 186
Reputation: 6461
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.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.Upvotes: 2
Reputation: 1954
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.
Upvotes: 0