Support library only using latest versions - android

About Android support library, since 25.0.1 has some bugs, so I want to use 7.24.1,
here's some of my gradle codes
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
But I find the project still refers the latest version; the version number "v7:24.2.1" does not work.
I want use 7:24.2.1, but when I click any Android support class, such as RecyclerView, it opens source code from sdk\extras\android\m2repository\com\android\support\recycler‌​view-v7\25.0.0\recyc‌​lerview-v7-25.0.0-so‌​urces.jar

Clean Project will do the trick. Furthermore consider to change compileSdkVersionto24 and also install Android SDK Build-tools in Android SDK Manager.
As the latest version of the support library according to the support library changelog is v7:25.0.1 and not v7:24.2.1 modify your build.gradle to have v7:25.0.1:
compile "com.android.support:appcompat-v7:25.0.1"
However, if you really need v7:24.2.1 then simply put:
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
You dont have to put the rest. They are already included as stated by cricket_007.

It turns out one of the depencencies include the android suppoert library25.0.0,
I solve it by downgrading the depencency library

Related

Firebase UI for Storage with Kotlin gives Error

I am getting error while adding dependency for firebase-ui-storage.
I have created app for Kotlin
build.gradle - before:
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-storage:10.2.6'
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
after adding:
compile 'com.firebaseui:firebase-ui-storage:1.2.0'
I am getting error like:
All com.android.support libraries must use the exact same version
specification (mixing versions can lead to runtime crashes). Found
versions 25.3.1, 25.1.1. Examples include
com.android.support:animated-vector-drawable:25.3.1 and
com.android.support:palette-v7:25.1.1
There are some combinations of libraries, or tools and libraries, that
are incompatible, or can lead to bugs. One such incompatibility is
compiling with a version of the Android support libraries that is not
the latest version (or in particular, a version lower than your
targetSdkVersion.)
I dont know why it happens even I dont have used vector drawable or palette
Any help?
Thanks in advance.
Recently I had the same issue. So I downgraded the versions to these:
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
compile 'com.android.support:design:25.0.0'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
compile 'com.google.firebase:firebase-storage:10.2.4'
and it worked fine for me.
But if you want to know what's wrong with your current dependencies, probably you should see what your full tree of dependencies is and from there, you will see which one of your libraries is asking for a different version of the Android Support libraries.

compile 'com.android.support:multidex:1.0.1' happened wrong: all com android support libraries must use the exact same version

Today, I update my Android studio to 2.3, and I update gradle to 3.4.1. But when I build my project, an error occurred:
This is the error
So I add " buildToolsVersion '25.0.0' "
My project can build successful, but another error occurred. I can't solve it. I hope to get some help. Thank you!
This is the error
When I add compile 'com.prolificinteractive:material-calendarview:1.4.2', this error will occur.
This is my androidDependencies
This is probably an issue with Android Studio 2.3. There's a new inspection that checks if all dependencies of com.android.support use the same version number. However, multidex doesn't have a matching version number. You can disable the inspection via the red light bulb icon next to it as a work-around for now
it's an unnecessary warning for the support:multidex, add this:
//noinspection AndroidLintGradleCompatible
compile 'com.android.support:multidex:1.0.1'
I'm also using updated Studio. You should use each library with the same version in order to avoid the Manifest Merger issue. Like this.
// To Support Design, CardView and RecyclerView Library
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.android.support:palette-v7:25.2.0'
// To Support MultiDex
compile 'com.android.support:multidex:1.0.1'
Here you will notice that each library have the same version.
Change version of com.android.support:recyclerview-v7 and com.android.support:support-core-utils to 25.2.0 (last version of support library: https://developer.android.com/topic/libraries/support-library/revisions.html)

How to add most recent dependencies to Android project?

Wants to use RecyclerView like described in this tutorial. But have problem already adding the import statement: Can not resolve symbol 'RecyclerView'.
Added compile statement to gradle script,
compile 'com.android.support:recyclerview-v7:23.1.1'
but Android studio says that a more recent version is available. Can this cause that import statement is not accepted?
23.1.1 is not the latest version of android support library
To get the current latest version you should use this if you're using compileSdkVersion 23:
compile 'com.android.support:recyclerview-v7:23.4.0'
or if you're using compileSdkVersion 24 then use this:
compile 'com.android.support:recyclerview-v7:24.0.0'
and to get the latest version available automatically, you can use this :
compile 'com.android.support:recyclerview-v7:+'

Android support library, optimal compile settings?

While importing support library in app gradle settings, what is the optimal configuration. For example-
If I just import support library like this:
compile 'com.android.support:support-v4:23.2.1'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
I find that the app works fine even if I just add appcompat code and do not add any recycler view import. I would like to know in what scenario will it be necessary?

Android RecyclerView Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable

There are lots of same question on this problem and in solution they said update gradle version but I'm using latest version then also I'm facing this issue
kindly help me with this.
Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "bd8994644a28e456358162533e01319cc08f4ef8"
Fix plugin version and sync projectOpen File
try with this versions
compile 'com.android.support:cardview-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
Hi change to and test :
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:cardview-v7:24.1.1'
compile 'com.android.support:recyclerview-v7:24.1.1'
I just updated my Android support library, Local Maven repository for support Libraries and Tools
and added this in build.gradle and it worked.
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:cardview-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'

Categories

Resources