when we are trying to build android using cordova phone-gap this error will occurs
:mergeDebugResources
:processDebugManifest D:\Android\ThePlug\platforms\android\AndroidManifest.xml:27:9-31 Error:
Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:support-v4:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:5-27:34 to override.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:processDebugManifest FAILED
FAILURE: Build failed with an exception.
Manifest merger failed : Attribute meta-data#android.support.VERSION@value val ue=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:2 7:9-31 is also present at [com.android.support:support-v4:26.0.0-alpha1] Androi dManifest.xml:27:9-38 value=(26.0.0-alpha1).Suggestion: add 'tools:replace="android:value"' to element a t AndroidManifest.xml:25:5-27:34 to override.
I am an ionic user, and can confirm there is a issue with version 1.9.1 of the facebook4 plugin which is causing this.
There are two ways to fix this, one quick workaround, and one solution.
To fix it so that you can build straight away, do the following: Add the following code to the end of the build.gradle file in platforms/android.
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.1' } } } }
A better fix is by using this plugin:
cordova plugin add cordova-android-support-gradle-release
, which should sort out any of the dependency issues.
The issue is discussed (at length) here: https://github.com/jeduan/cordova-plugin-facebook4/issues/507
Remove the facebook4 plugin and reinstall the old version 1.7.4
cordova plugin rm cordova-plugin-facebook4
cordova plugin add [email protected] --save --variable APP_ID="<myid>" --variable APP_NAME="<myname>"
It works for me.
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With