Exact same code ran yesterday well with ionic run android but with errors below today.
I googled and it seems that the gradle command encountered com.android.support conflicting v26-alpha1 and v25.3.1. But I am too rookie to know where to resolve.
Thanks for any help!
Execution failed for task ':processArmv7DebugManifest'.
> Manifest merger failed : 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.
Cordova CLI: 7.0.1
Ionic Framework Version: 3.2.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.10
Node Version: v6.10.3
Xcode version: Not installed
If you face this issue means that you are using one plugin which are too permissive in the specification of their dependencies. Grep your plugin and try to find references like ‘support-v4:+’ these should be improved to specify a specific library deps
You could find more information about that subject in the following issue (which actually mix a lot of different plugins):
In my case I had a conflict with cordova-diagnostic-plugin which was improved in v3.6.5 of the plugin, see changelog:
Thanks for the answer - works perfectly however, build.gradle is built dynamically every time you build the app so if you add anything in there it gets lost. To get round this create a build-extras.gradle file and the above code in there wrapped in ext.postBuildExtras. Keep this file in your root app folder so you can copy it into the platforms/android folder.
Attribute meta-data#android.support.VERSION@value value=(26.1.0) from AndroidManifest.xml:21:59-81
is also present at [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35 value=(25.4.0).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:21:9-84 to override.