Closed t2wu closed 6 years ago
$ cordova plugins
com.colibrisoftware.plugins.backgroundjs 3.3 "BackgroundJS" com.pylonproducts.wifiwizard 0.2.11 "WifiWizard" com.unarin.cordova.beacon 3.5.2 "Proximity Beacon Plugin" com.vallieres.plugin.getrouteripaddress 1.0.0 "GetRouterIPAddress" cordova-background-geolocation-lt 2.11.0-beta.2 "BackgroundGeolocation" cordova-ios-plugin-no-export-compliance 0.0.5 "iOS No Export Compliance" cordova-open-native-settings 1.4.1 "Native settings" cordova-plugin-add-swift-support 1.7.1 "AddSwiftSupport" cordova-plugin-android-permissions 1.0.0 "Permissions" cordova-plugin-android-wifi-manager 1.0.0 "Android WifiManager" cordova-plugin-app-version 0.1.9 "AppVersion" cordova-plugin-backbutton 0.3.0 "Backbutton" cordova-plugin-background-fetch 5.3.0 "CDVBackgroundFetch" cordova-plugin-badge 0.8.6 "Badge" cordova-plugin-bluenet-dfu 0.0.2 "Bluenet DFU" cordova-plugin-bluetooth-status 1.0.4 "Bluetooth status" cordova-plugin-bluetoothle 4.4.3 "Bluetooth LE" cordova-plugin-buildinfo 2.0.1 "BuildInfo" cordova-plugin-camera 4.0.1 "Camera" cordova-plugin-cocoalumberjack 0.0.4 "CocoaLumberjack" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-console 1.1.0 "Console" cordova-plugin-device 2.0.1 "Device" cordova-plugin-dialogs 2.0.1 "Notification" cordova-plugin-file 6.0.1 "File" cordova-plugin-firebase 0.1.25 "Google Firebase Plugin" cordova-plugin-geolocation 4.0.1 "Geolocation" cordova-plugin-inappbrowser 2.0.1 "InAppBrowser" cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)" cordova-plugin-ios-disableshaketoedit 1.0.0 "iOS Disable Shake to Edit" cordova-plugin-keyboard 1.2.0 "Keyboard" cordova-plugin-local-notification 0.9.0-beta.1 "LocalNotification" cordova-plugin-localization-strings 1.1.1 "Localization" cordova-plugin-network-information 2.0.1 "Network Information" cordova-plugin-smartconfig 1.0.1 "Cordova Smart Config" cordova-plugin-splashscreen 5.0.1 "Splashscreen" cordova-plugin-statusbar 2.4.1 "StatusBar" cordova-plugin-whitelist 1.3.3 "Whitelist" phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
Show me logs of your app booting:
$ adb logcat
Same problem here. Do you have an update?
@t2wu and @erbg show me your platforms/android/project.properties
. You have multiple plugins requiring different versions of google play-services dependencies.
target=android-26 android.library.reference.1=CordovaLib cordova.gradle.include.1=cordova-plugin-background-fetch/driverapp-build.gradle cordova.system.library.1=com.android.support:support-v4:24.1.1+ cordova.system.library.2=com.soundcloud.android:android-crop:1.0.0@aar cordova.system.library.3=com.android.support:support-v4:25.+ cordova.system.library.4=com.android.support:appcompat-v7:25.+ cordova.system.library.5=com.microsoft.azure:azure-mobile-android:3.3.0@aar cordova.gradle.include.2=phonegap-plugin-barcodescanner/driverapp-barcodescanner.gradle cordova.system.library.6=com.android.support:support-v4:27.+ cordova.gradle.include.3=cordova-background-geolocation-lt/driverapp-build.gradle cordova.system.library.8=com.google.android.gms:play-services-gcm:15+ cordova.system.library.9=me.leolin:ShortcutBadger:1.1.14@aar cordova.system.library.10=com.google.android.gms:play-services-location:11.8.0 cordova.system.library.11=com.android.support:appcompat-v7:27.0.0 cordova.system.library.7=com.android.support:support-v13:26.+ cordova.system.library.12=me.leolin:ShortcutBadger:1.1.17@aar cordova.system.library.13=com.google.firebase:firebase-messaging:11.6.2 cordova.gradle.include.4=phonegap-plugin-push/driverapp-push.gradle
May it be related to the use of the phonegap-plugin-push@1..?
I pasted it in another thread (the one about app crash). So I guess it's the same solution to both problems, I need to use the same google play services. How do I configure them though?
background-geolocation
allows you to configure the desired play-services
version via its GOOGLE_API_VERSION
phonegap-plugin-push
supports configuring play-services version via its similar FCM_VERSION
.
Each plugin importing google-play-services (or Firebase) should have a similar "variable" (you'll have to consult with each plugin to determine this).
Firebase version must be identical to Play Services version.
You can modify platforms/android/project.properties
directly but this file is volatile -- it will be destroyed and re-generated every time you remove / re-add the android platform.
Also, Google Support libraries must all be aligned to the same version. Background Geolocation also provides an APP_COMPAT_VERSION
config variable. phonegap-plugin-push
provides ANDROID_SUPPORT_V13_VERSION
.
When you have support libs all pointing to different versions, you have problems:
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.3=com.android.support:support-v4:25.+
cordova.system.library.4=com.android.support:appcompat-v7:25.+
cordova.system.library.6=com.android.support:support-v4:27.+
cordova.system.library.11=com.android.support:appcompat-v7:27.0.0
cordova.system.library.7=com.android.support:support-v13:26.+
The root support lib version should be greater then or equal to your target
version (in your case target=android-26
.
All these support lib versions must be aligned to the same version (eg: 27.0.0
)
OK I used an old version of cordova-plugin-firebase (hash 79dbf49) and and consulted this thread and managed to get it to compile.
And boy am I glad to see the license validation warning! Problem solved!
Ok, we updated our Push Plugin to version 2.0 and setted the Google_api_version accordingly. Problem is solved. Thanks
Your Environment
cordova -v
): 7.1.0cordova platform ls
): android 6.4.0Expected Behavior
Either error callback or success callback should be called.
Actual Behavior
Neither error callback or success callback gets called.
Steps to Reproduce
Context
Configure parameters for Geofence.
Debug logs
Not sure what to look for here.