cordova-plugin-local-notifications icon indicating copy to clipboard operation
cordova-plugin-local-notifications copied to clipboard

Build error when i install this plugin

Open udemethegrtman opened this issue 4 years ago • 3 comments

WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Build error when i install this plugin.

Your Environment

  • Plugin version:
  • Platform: Android
  • OS version: 10
  • Device manufacturer / model:
  • Cordova version (cordova -v): 10.0
  • Cordova platform version (cordova platform ls):
  • Plugin config
  • Ionic Version (if using Ionic)

Expected Behavior

I am supposed to install this notification plugin, and build without errors

Actual Behavior

Tell us what happens instead

Steps to Reproduce

Context

What were you trying to do?

Debug logs

Include iOS / Android logs

  • ios XCode logs
  • Android: $ adb logcat
_Reproduce this issue; include code to reproduce, if relevant_

D8: Program type already present: android.support.v4.app.INotificationSideChannel

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel

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

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

BUILD FAILED in 9m 18s
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
34 actionable tasks: 9 executed, 25 up-to-date
C:\laragon\www\MOBILE APPS\Mobilemech6\cordova\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: C:\laragon\www\MOBILE APPS\Mobilemech6\cordova\platforms\android\app\src\main\java\cordova\plugins\Diagnostic.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Program type already present: android.support.v4.app.INotificationSideChannel

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel

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

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

BUILD FAILED in 9m 18s
(node:908) UnhandledPromiseRejectionWarning: Error: Shell command exit with non zero code: 1
  at ChildProcess.<anonymous> (C:\Users\ANCHOR WAY\AppData\Roaming\npm\node_modules\framework7-cli\node_modules\exec-sh\lib\exec-sh.js:73:17)
  at ChildProcess.emit (events.js:210:5)
  at maybeClose (internal/child_process.js:1021:16)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
(node:908) 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:908) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

udemethegrtman avatar Jun 20 '21 05:06 udemethegrtman

up

brunogtds avatar Oct 27 '21 19:10 brunogtds

See if this helps: https://github.com/dpa99c/cordova-plugin-androidx-adapter

mcrio avatar Nov 02 '21 19:11 mcrio

I had same problem and Its now wokring after added @mcrio recommended plugin. thank you

sukucom avatar Jun 03 '22 12:06 sukucom