I updated today my support repository to 46.0.0 as the Android Studio notification popped up.
I go the error below :
Error:Execution failed for task ':app:processDevDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.0) from [com.android.support:support-v13:25.3.0] AndroidManifest.xml:27:9-31 is also present at [com.android.support:preference-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.
I updated all my dependencies to use Revision 26.0.0 Alpha 1 from 25.3.0, but it turns out I need to bump the compileSdk from 25 to 26. You can't do that if you have AS 2.3, you need to get the unstable alpha/beta version from canary.
This link shows the changes: https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0-alpha1
And concerning migrating to the new android O, that's the link: https://developer.android.com/preview/migration.html
It seems using AS stable version will not work with new repository.
How can I go back to the Android Studio Repository Version 45 instead of the new 46?
** Update: The merged manifest shows one of the generated library manifest contains
<meta-data
android:name="android.support.VERSION"
android:value="26.0.0-alpha1" />
But since it's a generated file editing is useless, that's why for now I'd stick to rev 45 until the new AS is in stable build
Step 1
To escape Gradle checking for incompatible
com.android.support
versions a quick fix is to add following code in app modulebuild.gradle
.This is a temporary fix that doesn't solve the underlying problems! It helped to continue develop your app with minimal modifications.
Step 2
Add this to the main manifest file
AndroidManifest.xml
.This entry will be removed when one of the next updates of the support repository is available.
Step 3
Add the following code at the end of app module
build.gradle
file:NB: It is recommended to make sure your Gradle libraries are updated and compatible to avoid runtime errors.
I think the best solution is to just revert the Android Support Library to version 45.
To do this, open this link (change version to whatever suits your needs)
https://dl-ssl.google.com/android/repository/android_m2repository_r45.zip
When downloaded, unzip and copy m2repository to android-sdk-root-folder\extras\android. Make sure to delete the existing m2repository prior to unzipping to avoid problems.
to me the problem was that the versions weren't the same in here
and the card view was
so i changed the version libraries to..
hope this help, good luck
What's the problem
Some libraries depend on version "X or newer" of Android support libraries so Gradle dependency resolution grabs whatever is the newest available ignoring you actually have a precise version specified in your
dependencies
block.This is not what you want. You want all support libraries with same version and major version has to match compile SDK version.
What's the solution
Fortunately you can force a specific support library version.
Put this at the end of your app module
build.gradle
:Of course replace the version with whatever it is you're using.
Version values for support libraries in
dependecies
block are now irrelevant.If you have doubts
This is a well documented method and it's working.
What can you do to help
Find the libraries which depend on a range of support library versions
and let the authors of said libraries know they should transitively depend on the oldest support libs their library can do with.
This aims to avoid the issue altogether.
just do this that's all :-
compile 'com.android.support:appcompat-v7:25.3.1'
here v7:25.3.1 is my current version you just put urs.
in app gradle file
Their is a solution to fix it out:
Ex. in my case:
This will force project to use mentioned library.