How to identify Android Support Library versions in gradle? - android

Whenever a new Android Support Repository is released, I have to update my dependencies in the app Gradle file.
dependencies {
compile 'com.android.support:support-v4:25.1.1'
}
However, I don't get much of a clue as to what version to add i.e.: 25.1.1 with every release unless I go and check the Recent Support Revisions.
The version shown in the Android SDK Manager: Android Support Repository, revision 44.
I want to know how to get the right version given the revision number of the Android Support Repository during updates.
All other version such as Build tools show the right corresponding versions, only this one stumps me.

You can use the latest.release suffix in for your libraries like this:
compile 'com.android.support:support-v4:latest.release'
It will insure you are always using the latest release version.

The revision number isn't really that important.
The support library major version should match the compileSdk.

Related

Supporting different compile SDK version for my library

I have a android library for push notifications and with the release of android Oreo and notification channels I moved up my compile SDK version to 26 and started using support library 26.1.0 along with it to support channel features.
Some of my users are still on compile SDK version 25 and are reluctant to move up the compile version to 26. Also as a best practise most of them want have the support library and compile SDK version on same major version.
This is causing and issue for me on how to support multiple compile version. I don't want to maintain different SDKs for different compile sdk version.
Current implementation: I have added support-compat 26 in provided scope and expect the app developer to add it as compile/implemention.
Old versions can be used but concern here is how to manage bug fixes, enhancements and features

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 to get Android Support library 20 revision in sdk

I'm using Android Studio. Everything was going good but I updated Android support library to 22 revision and my application UI is changed and In some Activities app is crash.
I want to downgrade the version of Android support library from 22 revision to 20 revision in SDK so I uninstalled Android support library but when I install it every time 22 revision is installed.
How can I install 20 revision of Android support library?
You can check inside the sdk folder in your pc.
androidsdk\extras\android\m2repository\com\android\support
For each support library you will find all versions available.
compile 'com.android.support:support-v4:19.1.0'
compile 'com.android.support:support-v4:20.0.0'
compile 'com.android.support:support-v4:21.0.3'
Pay attention.
If you use the v20+, you have to use the api 21+ to compile your project.
In your app's module there is a build.gradle file. Inside that you will see something like:
compile 'com.android.support:support-v4:xx.x.x'
This is how you dictate which support library is used when compiling the app. You will need to have the version you choose installed in your SDK manager.

Is there any tools for Android Studio to notify user there is a newer version for the dependency?

say there is a newer version of 3rd party dependency released. How does our Android Studio be notified?
For gradle, they recommend to build against exact versions.
But you can write it like below to use latest library version
compile "junit:junit:4.+"
"But the + is not recommended because it can break builds when libraries depend on each other and use different versions."
Check this. it may help you.
Gradle plugin to discover dependency updates
https://github.com/ben-manes/gradle-versions-plugin

Android v7 version 19.1.0 Support Library Direct Link

I am trying to Download the v7 app compat support library version 19.1.0. The current version of the library is 21.something. However, this requires lolipop as the compile sdk and an update to the build tool. We do not want to make these changes. Also we are using ant and not gradle. Hence, Need a direct download link to the 19.1 version of the support libraries.
Thanks
These can be downloaded from the Github account.
https://github.com/android/platform_frameworks_support/tree/master
You specifically want 19.1.0 which is located here:
https://github.com/android/platform_frameworks_support/tree/l-preview

Categories

Resources