Keeping updated with the Android Support Library revisions - android

Eclipse provides a single click and download for the support library for an android project, and it adds it to the libs/ folder as "android-support-v4.jar"
The above jar has no reference to revision number (currently r10), so surely (unless I use maven) how are other people keeping up to date with the support library revisions?

I agree with #yorkw, the SDK manager tells you which version is currently installed. Also, using the android tools -> add support library will in-fact install a newer version if available, you will see that later in the SDK manager.
If what you are asking is how you know a new version is available so you can update? than the answer is definitely SDK manager, as yorkw said.

Related

How add Android Support Repository Rev. 36 to Eclipse version Neon release 4.6.0?

Recently I've removed my old Eclipse and download/install new version Neon.
I know I have to download SDK from Android SDK Manager. So I've download some releases which I needed and for "Extra" part could find Android Support Library.
I've checked Obsolete and found it, but I want to use new version of appcompat (24.2.0) which is part of Android Support Repository and I've downloaded, but can not add it by normal way (I think).
So how to add appcompat 24.2.0 into Eclipse?
Note:
When I want to import Existing Android code Into Workplace and address it to the appcompat there isn't anything to add, because it's Maven:
C:\android-sdk-windows\extras\Android\m2repository\com\Android\support\appcompat-v7\24.2.0

How do you find which versions / libraries to import in the Gradle?

In the Gradle, there is a dependency section where you can choose to import libraries for things like RecyclerView, Support library, etc.
How do you know what the latest versions are to import for everything? Is there a lookup somewhere?
Preferences -> Appearance... -> System Settings -> Android SDK
(or click the Android downloader icon in the toolbar)
In there, change the tab to SDK Tools.
In the list of installed components, look for "Android Support Library". The version number of that is the current version of the libraries you can use in your projects locally.
Link shows the revision history of the support libraries, though I have often encountered times when it has been out of date. Android Developers Blog also usually posts when a new version of the support libraries are released. The easiest way is just to use android studio, you will get a lint warning when there are updated versions of a library you are using is available.

What is the use of libraries in android\sdk\extras\android\m2repository\com\android\support folder

There are some folders in the android\sdk\extras\android\m2repository\com\android\support folder which is my android sdk manager's location.
Can anybody tell me what use do they have?
This folder contains your support libraries, which provide backward compatibility for Android APIs. You can find more details about support libraries here.
You can download the support library version you require from the SDK manager.
This folder contains support Libraries from maven Repository if you are using Android Studio (Gradle Build System).

Android SDK Build Tool Multiple Versions

I need to know, Do we need to install every Android SDK Build Tool, or only the latest one will be sufficient?.
See this image for reference,
Quote from official android website:
Build Tools is a component of the Android SDK required for building
Android application code. The latest version of these tools is
included in the SDK starter package and installed in the
/build-tools/ directory.
You should always keep your Build Tools component updated by
downloading the latest version using the Android SDK Manager. By
default, the Android SDK uses the most recent downloaded version of
the Build Tools. If your projects depend on older versions of the
Build Tools, the SDK Manager allows you to download and maintain
separate versions of the tools for use with those projects.
To make it short,if your project is using an OLDER version of apis (like 2.2 etc), it might make sense to use the build tools that were supplied to it.
See this to know more about the build tools.
But, having said that, there is NO NEED TO INSTALL OLDER VERSIONS of the build tools. You should always use the latest
Android SDK build tools are used to debug, build, run and test an Android application,so the latest update will always have the most refined of features.
But of course, this is only for the final android app. If you want to use the version specific features of the build tools, you will need to download the respective build-tools.
Quoting The comment below for easier readability :
It's more if you created custom build scripts (Ant, Gradle, etc.) that
assumed certain command-line switches for the build tools (dx, aapt,
etc.), you can stick with a particular version of those build tools.
Otherwise, developers tend to move to the most recent version of those
tools, for better performance, bug fixes, and the like
If you are not using any 3rd party libraries or support libraries then no you dont need to install everything but some libraries (google play services and the support library for example) require you to install other SDK's
Long story short, it is recommended you install the latest version of the SDK Build tools. The older versions are left there for backward compatibility, that is if your projects depend on older versions of the Build Tools. I've resolved many errors in my projects by just referencing older versions of the build tools.But most importantly, you are better off with the latest version.

How can I tell which Android Support Library v4 revision I use?

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
in eclipse package explorer right click in your project
select android tools -> Add supported Library
there you see which supprt library revision id you have, in my case is 11
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
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.
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).
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.

Categories

Resources