rashnk opened a new issue #574: build android failed when camera plugin is added URL: https://github.com/apache/cordova-plugin-camera/issues/574 # Bug Report ## Problem cordova build android failed Error : `D8: Program type already present: android.support.v4.app.INotificationSideChannel FAILURE: Build failed with an exception. * What went wrong: > Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED 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 22s34 actionable tasks: 9 executed, 25 up-to-date ` ### What is expected to happen? cordova build android should generate apk without fail ### What does actually happen? Build failed with error ## Information I have google the issue and found the project need to be migrated to androidx, there are are some 3rd party plugins exist for this like cordova-plugin-androidx-adapter which fixes the issue ### Command or Code cordova build android ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> ### Version information <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> $ cordova -v `9.0.0 (cordova-lib@9.0.1)` ` "dependencies": { "cordova-android": "^8.1.0", "cordova-browser": "^6.0.0", "cordova-plugin-camera": "^4.1.0" },` gradle-6.2.1 Windows 8.1 Android Studio 3.6.1 for Windows ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [ ] I searched for existing GitHub issues - [ ] I updated all Cordova tooling to most recent version - [ ] I included all the necessary information above
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org