How can I tell which Android Support Library v4 re

2020-07-03 07:34发布

问题:

I can see in the Android SDK manager the version installed on my computer (in Android SDK manager), but usually a project uses its own copy from the libs folder.

Is there a way I can tell which version is the android-support-v4.jar being used in a specific project besides the file date?

Any method is considerable - by code / eclipse / file manager

回答1:

  1. in eclipse package explorer right click in your project
  2. select android tools -> Add supported Library

    there you see which supprt library revision id you have, in my case is 11



回答2:

  • Take the md5 hash of the jar in your app's libs directory.
  • Compare it to the hashes of support library jar files to work out exactly which one you're using.

e.g. to generate hashes you could use: http://nule.org/wp/?page_id=86 run this from a batch file with:

java -jar JMd5Sum.jar


回答3:

when you are selecting android Tools -> Add support Library option .it has automatically added compatible v4 library .android os is telling which one is compatible with your project. If you wants to add particular version of any jar .firstly you have downloaded and put manully in libs folder then it added as external jar.



回答4:

Build a SHA1 hash of the support library v4 jar file and compare the result with the listed hashes here: http://www.smartphoner.org/2014/11/23/android-support-library-v4-revisionen-und-hashes/

Nower days the actual support library revision is equal to the api level of the newest android version. Currently this is 21 (Lollipop).



回答5:

Android SDK can show the version of Android support Repository, and make sure you download Android Support Repository by using Android SDK Manager.

If you really want to add an old support lib, you can check the version under Android studio. Right click your project, select "Open Module Settings" -> then select your app modules -> "Dependencies" . You can check your support lib version.