I am trying to ask the user permission before accessing their camera. I use the ionic diagnostic plugin for this. The app builds fine on Phonegap build before adding the diagnostic plugin. After adding plugin I get the following error through Phonegap build:
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=(26.0.0-alpha1) from [com.android.support:support-v4:26.0.0-alpha1] AndroidManifest.xml:27:9-38 is also present at [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31 value=(25.3.1). Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:25:5-27:41 to override
The diagnostic plugin is clashing with another one you are using. Searching for parts of the error message will show you that currently quite some users have this problem, also while building locally.
@Sujan12 Yes I think this is a clash with some other plugin. I have tried adding the diagnostic plugin to a brand new project and tried building. That worked fine.
@dgaurav I tried adding that code in platforms/android/build.gradle. Still gives the same error unfortunately.
I know this didn’t work for @Mcflurry81160, but strangely enough this worked for me. Maybe because beforehand, I also ran this command kind of as a safety net: