Atchay opened a new issue #919: Cordova build error when using FCM messaging and camera plugin together. URL: https://github.com/apache/cordova-android/issues/919 # Bug Report ## Problem When adding cordova-plugin-firebase-messaging and cordova-plugin-camera in the same project build failed in cmd. ### What is expected to happen? BUILD SUCCESSFUL ### What does actually happen? BUILD FAILED ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> 1)ionic cordova plugin add cordova-plugin-firebase-messaging. 2)ionic cordova plugin add cordova-plugin-camera. 3)ionic cordova build android, D:\Rajesh\fcmApp>ionic cordova build android > ionic-v1.cmd build [13:58:54] Cannot load gulp: ReferenceError: primordials is not defined [13:58:54] Cannot load gulp: ReferenceError: primordials is not defined [13:58:54] Cannot run sass task: missing in gulpfile.js [13:58:54] Cannot load gulp: ReferenceError: primordials is not defined > cordova.cmd build android Running command: node D:\Rajesh\fcmApp\hooks\after_prepare\010_add_platform_clas s.js D:\Rajesh\fcmApp Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=D:\ProgramFiles\Android\sdk (recommended setting) ANDROID_HOME=D:\ProgramFiles\Android\sdk (DEPRECATED) Subproject Path: CordovaLib Subproject Path: app > Configure project :app Observed package id 'system-images;android-23;google_apis;x86' in inconsistent l ocation 'D:\ProgramFiles\Android\sdk\system-images\addon-google_apis-google-23\x 86' (Expected 'D:\ProgramFiles\Android\sdk\system-images\android-23\google_apis\ x86') registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCol lection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCol lection) > Task :app:preBuild UP-TO-DATE > Task :CordovaLib:preBuild UP-TO-DATE > Task :CordovaLib:preDebugBuild UP-TO-DATE > Task :CordovaLib:checkDebugManifest UP-TO-DATE > Task :CordovaLib:processDebugManifest UP-TO-DATE > Task :app:preDebugBuild > Task :CordovaLib:compileDebugAidl NO-SOURCE > Task :app:compileDebugAidl NO-SOURCE > Task :CordovaLib:packageDebugRenderscript NO-SOURCE > Task :app:compileDebugRenderscript UP-TO-DATE > Task :app:checkDebugManifest UP-TO-DATE > Task :app:generateDebugBuildConfig UP-TO-DATE > Task :app:prepareLintJar UP-TO-DATE > Task :app:generateDebugSources UP-TO-DATE > Task :CordovaLib:compileDebugRenderscript UP-TO-DATE > Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE > Task :CordovaLib:generateDebugResValues UP-TO-DATE > Task :CordovaLib:generateDebugResources UP-TO-DATE > Task :CordovaLib:packageDebugResources UP-TO-DATE > Task :CordovaLib:generateDebugRFile UP-TO-DATE > Task :CordovaLib:prepareLintJar UP-TO-DATE > Task :CordovaLib:generateDebugSources UP-TO-DATE > Task :CordovaLib:javaPreCompileDebug UP-TO-DATE > Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE > Task :CordovaLib:processDebugJavaRes NO-SOURCE > Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDeb ug UP-TO-DATE > Task :app:javaPreCompileDebug > Task :app:mainApkListPersistenceDebug UP-TO-DATE > Task :app:generateDebugResValues UP-TO-DATE > Task :app:generateDebugResources UP-TO-DATE > Task :app:writeDebugApplicationId UP-TO-DATE > Task :app:processDebugGoogleServices Parsing json file: D:\Rajesh\fcmApp\platforms\android\app\google-services.json > Task :app:mergeDebugResources > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE > Task :app:processDebugManifest > Task :app:processDebugResources Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: D:\Rajesh\fcmApp\platforms\android\app\src\main\java\by\chemerisuk\cordova \support\ReflectiveCordovaPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. > Task :app:compileDebugJavaWithJavac > Task :app:compileDebugNdk NO-SOURCE > Task :app:compileDebugSources > Task :app:mergeDebugShaders UP-TO-DATE > Task :app:compileDebugShaders UP-TO-DATE > Task :app:generateDebugAssets UP-TO-DATE > Task :CordovaLib:mergeDebugShaders UP-TO-DATE > Task :CordovaLib:compileDebugShaders UP-TO-DATE > Task :CordovaLib:generateDebugAssets UP-TO-DATE > Task :CordovaLib:packageDebugAssets UP-TO-DATE > Task :app:mergeDebugAssets > Task :app:validateSigningDebug UP-TO-DATE > Task :app:signingConfigWriterDebug UP-TO-DATE > Task :app:transformClassesWithDexBuilderForDebug > Task :app:transformDexArchiveWithExternalLibsDexMergerForDebugD8: Program type already present: android.support.v4.app.INotificationSideChannel FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForD ebug'. > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio/build/d ependencies#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 35s 36 actionable tasks: 10 executed, 26 up-to-date D:\Rajesh\fcmApp\platforms\android\gradlew: Command failed with exit code 1 Erro r output: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: D:\Rajesh\fcmApp\platforms\android\app\src\main\java\by\chemerisuk\cordova \support\ReflectiveCordovaPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. D8: Program type already present: android.support.v4.app.INotificationSideChanne l FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForD ebug'. > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio/build/d ependencies#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 35s [ERROR] An error occurred while running subprocess cordova. cordova.cmd build android exited with exit code 1. Re-running this command with the --verbose flag may provide more information. ### Command or Code <!-- What command or code is needed to reproduce the problem? --> 1)ionic cordova plugin add cordova-plugin-firebase-messaging. 2)ionic cordova plugin add cordova-plugin-camera. 3)ionic cordova build android ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Android ### 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. --> Latest ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [x] I searched for existing GitHub issues - [x] I updated all Cordova tooling to most recent version - [x] 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
