Can't build after install cordova-plugin-filepath


#1

After install the Plugin cordova-plugin-filepath i get the following Error if i try to build:

:processDebugManifest
FAILED

FAILURE: Build failed with an exception.

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

BUILD FAILED
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 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.

Total time: 9.136 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:\development\xxx\xxx.yyy.zzz\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 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 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.

[ERROR] An error occurred while running cordova run android (exit code 1).

It work perfect after uninstall the Plugin. Ionic info:

cli packages: (C:\Users\username.npm-packages\node_modules)

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 1.1.4
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 2.3.0

System:

Node : v6.9.4
npm  : 3.10.10
OS   : Windows 10

Misc:

backend : legacy

When i try to install the Plugin again with “npm install --save @ionic-native/file-path”, i get the following Warning:

±- UNMET PEER DEPENDENCY @ionic-native/core@3.14.0
`-- @ionic-native/file-path@4.3.0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm WARN @ionic-native/file-path@4.3.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.

Please help.


#2

It looks like you have plugins with mutually incompatible versions of Android support libraries installed. If you can’t figure out who the culprits are by examining their code, you can always try eliminating them in groups to narrow it down.


#3

Thank’s for Feedback,
i use a fork of the Plgin from https://github.com/compuhelmac/cordova-plugin-filepath/commit/1cf8f6ab745ee2c0044034c4093834df14d083a3 and now it works.