# Apps dont build when installing Local Notification plugin

**URL:** <https://forum.ionicframework.com/t/apps-dont-build-when-installing-local-notification-plugin/132380>\
**Category:** ionic-v3\
**Created:** [June 8, 2018, 12:19am UTC](https://forum.ionicframework.com/t/apps-dont-build-when-installing-local-notification-plugin/132380 "2018-06-08T00:19:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fragan](https://avatars.discourse-cdn.com/v4/letter/f/f14d63/32.png) [@Fragan](https://forum.ionicframework.com/u/Fragan)\
**Post date:** [June 8, 2018, 12:19am UTC](https://forum.ionicframework.com/t/apps-dont-build-when-installing-local-notification-plugin/132380/1 "2018-06-08T00:19:46Z")

</div>

Hello, my app was running fine until i installed **Local Notifications** native plugin:  
I executed this command : `ionic cordova plugin add cordova-plugin-local-notification`  
then this one `npm install --save @ionic-native/local-notifications`  
Then i added `import { LocalNotifications } from '@ionic-native/local-notifications';` on app.module.ts  
Then i added `LocalNotifications` on the provider part of NgModule  
Then i added `import { LocalNotifications } from '@ionic-native/local-notifications';` on my home.ts  
Then i added `public localNotifications: LocalNotifications,` to the constructor parameter  
Then i tried to run the app and it dont wanna build, here’s the log:

```auto
$ ionic cordova run android --target=95142bf1
Running app-scripts build: --platform android --target cordova
[01:14:05] build dev started ...
[01:14:05] clean started ...
[01:14:05] clean finished in 15 ms
[01:14:05] copy started ...
[01:14:05] deeplinks started ...
[01:14:05] deeplinks finished in 171 ms
[01:14:05] transpile started ...
[01:14:10] transpile finished in 5.13 s
[01:14:10] preprocess started ...
[01:14:10] preprocess finished in 15 ms
[01:14:10] webpack started ...
[01:14:11] copy finished in 5.79 s
[01:14:18] webpack finished in 8.11 s
[01:14:18] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this w arning.
[01:14:20] sass finished in 1.81 s
[01:14:20] postprocess started ...
[01:14:20] postprocess finished in 31 ms
[01:14:20] lint started ...
[01:14:20] build dev finished in 15.49 s
> cordova run android --target 95142bf1
Android Studio project detected

ANDROID_HOME=C:\Users\Win 7\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.

Configuration 'compile' in project ':app' is deprecated. Use 'implementation' in stead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be re moved in Gradle 5.0. Please use Task.doLast(Action) instead.

        at build_85bbhcbf5ogx3eqe0v2ws0it5.run(C:\Users\Win 7\Desktop\ThePfe\pfe z\platforms\android\app\build.gradle:146)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
 UP-TO-DATE
:CordovaLib:compileDebugRenderscript
 UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar
 UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest
 UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac

UP-TO-DATE
:CordovaLib:processDebugJavaRes

NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
 UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild

:app:compileDebugAidl
 UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig
 UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources

Error: Could not delete path 'C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\andro id\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-pa- rIN'.
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: Could not delete path 'C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\and roid\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-p a-rIN'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
21 actionable tasks: 2 executed, 19 up-to-date
(node:6248) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with ex it code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: Could not delete path 'C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\and roid\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-p a-rIN'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
    at ChildProcess.whenDone (C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\andro id\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:6248) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6248) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre cated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

[OK] Your app has been deployed.
     Did you know you can live-reload changes from your app with --livereload?

```

---

<div class="post-metadata">

**Author:** ![rickybruno89](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@rickybruno89](https://forum.ionicframework.com/u/rickybruno89)\
**Post date:** [July 1, 2018, 1:03am UTC](https://forum.ionicframework.com/t/apps-dont-build-when-installing-local-notification-plugin/132380/2 "2018-07-01T01:03:09Z")

</div>

Hi! I have the same problem. This new cordova’s plugin is not compatible with ionic. Try with the old one (see [https://github.com/katzer/cordova-plugin-local-notifications/issues/1477](https://github.com/katzer/cordova-plugin-local-notifications/issues/1477)). I already try but not work for me.

---

<div class="post-metadata">

**Author:** ![esesgza](https://avatars.discourse-cdn.com/v4/letter/e/d6d6ee/32.png) [@esesgza](https://forum.ionicframework.com/u/esesgza)\
**Post date:** [August 8, 2018, 11:59am UTC](https://forum.ionicframework.com/t/apps-dont-build-when-installing-local-notification-plugin/132380/3 "2018-08-08T11:59:21Z")

</div>

Did you find a solution?

---

<div class="post-metadata">

**Author:** ![DonPabelito89](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/donpabelito89/32/130756_2.png) [@DonPabelito89](https://forum.ionicframework.com/u/DonPabelito89)\
**Post date:** [February 20, 2020, 1:10pm UTC](https://forum.ionicframework.com/t/apps-dont-build-when-installing-local-notification-plugin/132380/4 "2020-02-20T13:10:03Z")

</div>

My apps build fails too if i use Katzer Local Notification Plugin ! But my error message is different than yours. Mine is: :processReleaseManifest …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.

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [February 21, 2020, 2:55am UTC](https://forum.ionicframework.com/t/apps-dont-build-when-installing-local-notification-plugin/132380/5 "2020-02-21T02:55:17Z")

</div>

That looks to me like you have two different plugins fighting, each demanding different versions of the same thing. If you can’t figure out who the culprits are, try posting your `package.json`.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:01pm UTC](https://forum.ionicframework.com/t/apps-dont-build-when-installing-local-notification-plugin/132380/6 "2021-07-19T21:01:37Z")

</div>

Closed on July 19, 2021, 9:01pm UTC


