Full copy from the following blog address, thank Yumbo Lord! : http://blog.csdn.net/fff2666/article/details/68062717
For the following two errors
Java. lang. noclassdeffounderror:failed resolution Of:landroid/support/v4/animation/animatorcompathelper
And
Manifest merger Failed:attribute meta-data#android[email protected] 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 in androidmanifest.xml:25:5-27:34 to override.
Because if there are different versions of support or other externally referenced libraries in the program, Gradle will compile with the highest version of the local hold when merging, so 25 of support has the potential to refer to 26, which will result in a property merge error. Or class is lost, the workaround is to force the use of the same version of the library:
Configurations.all {
resolutionstrategy.eachdependency {dependencyresolvedetails Details
def requested = details.requested
if (Requested.group = = ' Com.android.support ') {
if (!requested.name.startswith ("Multidex")) {
Details.useversion ' 25.3.0 '
}
}
}
}
Reference:
http://stackoverflow.com/questions/42949974/android-support-repo-46-0-0-with-android-studio-2-3/42957234#42957234
Http://stackoverflow.com/questions/42987363/java-lang-noclassdeffounderror-failed-resolution-of-landroid-support-v4-animat
Problems with Android support 26.0.0-ALPHA1 (copied)