There may be other ways, but here is what i use:
You can find out the latest version using Android Studio by replacing the version number of your library in build.gradle compile line, with just +
, and click on Sync Now
in upper right corner of the window.
in your case, for example
dependencies {
compile 'com.android.support:mediarouter-v7:+'
}
Android Studio will pop up a hint/bulb, which has options Replace with specific version
you can click, which will fill-in the latest version in-place of +
. Please see below screeshot:
If this doesn't work the first time, let gradle complete its sync, and retry (replace + with + or any file modification will do, click the sync now again and hint bulb will show up).
For example, for your library, i simply pasted this line compile 'com.android.support:mediarouter-v7:+'
under my dependencies and followed the above process, Android Studio filled in with below version