RecyclerView Dependency error (Solved!)


#1

Hi,

I have added recyclerview-v7 as shown in p.180.

However, the following error message comes up:

"Error:Execution failed for task ‘:app:processDebugManifest’.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.0) from [com.android.support:appcompat-v7:25.3.0] AndroidManifest.xml:27:9-31
is also present at [com.android.support:recyclerview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:25:5-27:34 to override."

Please kindly help me how to solve it.

Thanks.

I’ve solved the problem. It must be some compatibility problem with sdk. I opened build.gradle(Module:app) to check dependencies and erased/added again support-v4, recyclerview v-7, appcompat v-7 in File>Poject Structure. It worked.


#2

Hi!

I had the same problem. But I figured out that the problem is from recyclerView dependency that you add to compile with. So try to use this: compile ‘com.android.support:recyclerview-v7:21.0.0’


#3

I was having the same issue after adding the RecyclerView library which was coming in as version 26.0.0-alpha1.
‘com.android.support:recyclerview-v7:26.0.0-alpha1’

I noticed my Appcompat library was at version 25.3.1
’com.android.support:appcompat-v7:25.3.1’

So I was able to fix the error by updating the AppCompat library to match the RecyclerView version.

Goto Project Structure->app->Dependencies and remove any older AppCompat libraries then click add and search for com.android.support:appcompat-v7 and you should see a newer version that matches the RecyclerView library.


#4

I don’t know why but when I was trying to add dependencies it gave me option of compile ‘com.android.support:recyclerview-v7:26.0.0-alpha1’ and compile 'com.android.support:appcompat-v7:26.0.0-alpha1’for both of them. I removed it and manually coded below and sync gradle. It worked for me.

compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:appcompat-v7:25.2.0'

#5

Awesome easy solution for the problem, thanks!


#6

it helped me… thanks a lott…