Android builds on Ionic pro are suddenly failing (Manifest merger failed)


#1

So previously Android builds on Ionic pro ran fine, but recently builds seems to fail, even on older commits where it used to compile just fine. So I’m not sure if the error is related to Ionic pro itself?

Here’s the log:

BUILD FAILED

Total time: 2 mins 17.375 secs
Error: /usr/src/app/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/usr/src/app/platforms/android/AndroidManifest.xml:28:13-35 Error:
Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:26:9-28:38 to override.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processDebugManifest’.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:26:9-28:38 to override.


#2

For anyone else running into this issue, adding https://github.com/dpa99c/cordova-android-support-gradle-release worked for me.