dpa99c / cordova-plugin-firebasex

Cordova plugin for Google Firebase
MIT License
571 stars 467 forks source link

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf #239

Closed BVJin closed 4 years ago

BVJin commented 4 years ago

Installed the plugin following with README, met this error when trying to run Android app here is 'cordova plugin list'

branch-cordova-sdk 4.0.0 "branch-cordova-sdk" cc.fovea.cordova.purchase 6.0.0 "Purchase" com.hutchind.cordova.plugins.streamingmedia 0.1.4 "StreamingMedia" com.omarben.inappreview 0.0.5 "inappreview" cordova-android-play-services-gradle-release 4.0.0 "cordova-android-play-services-gradle-release" cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release" cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport" cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx" cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter" cordova-plugin-apprate 1.2 "AppRate" cordova-plugin-console 1.0.4 "Console" cordova-plugin-customurlscheme 4.2.0 "Custom URL scheme" cordova-plugin-device 1.1.3 "Device" cordova-plugin-device-motion 1.2.2 "Device Motion" cordova-plugin-dialogs 1.3.0 "Notification" cordova-plugin-facebook4 2.2.0 "Facebook Connect" cordova-plugin-file 4.3.2 "File" cordova-plugin-firebasex 7.0.1 "Google Firebase Plugin" cordova-plugin-globalization 1.0.4 "Globalization" cordova-plugin-google-analytics 1.6.0 "Google Universal Analytics Plugin" cordova-plugin-image-picker 1.1.1 "ImagePicker" cordova-plugin-inappbrowser 1.5.0 "InAppBrowser" cordova-plugin-ios-disableshaketoedit 1.0.0 "iOS Disable Shake to Edit" cordova-plugin-screen-orientation 1.4.2 "Screen Orientation" cordova-plugin-shake 0.5.4 "Shake Gesture Detection" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-vibration 2.1.2 "Vibration" cordova-plugin-whitelist 1.3.0 "Whitelist" cordova-plugin-x-socialsharing 5.1.6 "SocialSharing" es6-promise-plugin 3.0.2 "Promise" ionic-plugin-keyboard 2.2.1 "Keyboard" nl.kingsquare.cordova.background-audio 1.0.1 "background-audio" urbanairship-cordova 7.0.1 "Urban Airship

Can you help? Being struggled with this problem for days.

dpa99c commented 4 years ago

This looks to me to be caused by conflicting library versions - likely since you have a lot of plugins in your project. You can confirm this by looking at the resulting platforms/android/app/build.gradle and look for conflicting versions in the dependencies section. This plugin allows you to specify Android component versions via plugin variables at plugin install time in order to allow you to align with other plugins. You can confirm this plugin works fine in isolation by building and running the example project.

Closing as this issue is not directly caused by this plugin but is the result of conflicts with other plugins which must be resolved by the plugin user.