Closed yoprogramo closed 5 years ago
I am currently getting the same error on windows 10 with v4.0.1. (i can build my app with v3.3.0 + cordova-android v8.0.0 without any errors)
i have created an empty project with these dependencies only:
"dependencies": {
"cordova-android": "^8.0.0",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-firebase-lib": "4.0.1"
},
"cordova": {
"plugins": {
"cordova-plugin-firebase-lib": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-camera": {}
},
"platforms": [
"android"
]
},
after adding cordova-plugin-camera, i've got these Errors:
D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
> 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$Stub
v4.0.1 use AndroidX, but cordova-plugin-camera is not yet supported
Hi @sagrawal31 Is there any update to fix this? thanks
Can you try running:
cordova plugin add cordova-plugin-androidx
Can you try running:
cordova plugin add cordova-plugin-androidx
Yes, it works but requires Cordova@9
Can you try running:
cordova plugin add cordova-plugin-androidx
after install cordova-plugin-androidx and cordova-plugin-androidx-adapter
It's works!! thx
thanks @davidzxc12 it did fix the issue and you do need to install cordova-plugin-androidx and cordova-plugin-androidx-adapter
Documented this at https://github.com/wizpanda/cordova-plugin-firebase-lib#androidx
Error compiling project (compiles ok before adding this plugin)
To Reproduce
My plugins are:
cordova-plugin-advanced-geolocation 1.1.0 "Cordova Advanced Geolocation Plugin - Android" cordova-plugin-background-download 0.0.2 "Background Download" cordova-plugin-badge 0.8.8 "Badge" cordova-plugin-camera 4.0.3 "Camera" cordova-plugin-device 2.0.2 "Device" cordova-plugin-file 6.0.1 "File" cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps" cordova-plugin-headsetdetection 3.0.0 "Headset Detection" cordova-plugin-inappbrowser 3.0.0 "InAppBrowser" cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)" cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification" cordova-plugin-native-spinner 1.1.3 "Native Spinner" cordova-plugin-purchase 8.1.1 "Purchase" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
I compile fine with these, then
cordova plugin add cordova-plugin-firebase-lib
Expected behavior
The project fails to compile
Console Logs
` FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
`
Plugin Version
4.0.1
Desktop (please complete the following information):