I’m following this guide to get started on using the diagnostic plugin: http://masteringionic.com/blog/2017-04-29-using-the-ionic-native-diagnostics-plugin/
And when I get to building an Android APK, I get this error in the CLI:
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.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.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 22.339 secs
Error: cmd: 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.
C:\Users\user\Desktop\GitRepos\PPRepo\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.
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.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.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
And I don’t know what it means. Here is my project’s information:
@ionic/cli-plugin-cordova : 1.6.2
@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.0.2
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.5.3
System:
Android SDK Tools : 26.0.2
Node : v7.10.0
OS : Windows 10
npm : 4.2.0
Online, I found some people who were having a similar issue and their solution was to downgrade the plugin, I tried doing so, but the problem is that the code related to the plugin will not run on the device I’m testing on, and I’m assuming that’s because it’s a pretty new device, API level 26.
To see what may be the problem with the newest plugin version, I created a new Ionic project exactly the same way as this project and it worked perfectly. The only difference is that this project runs on Ionic 3.5.3 and the separate one runs on 3.6.0. Because of this the best solution sounds to update this project to 3.6.0 but you can’t do that unless you start a new project and transfer everything form the old project to the new one. This would mean re-doing everything I have on my older project and is not do-able unless it’s absolutely necessary. Any ideas?