Closed gautambisht closed 6 years ago
When you install the plugin from : "git+https://2cXXXXXXXX@github.com/transistorsoft/cordova-background-geolocation.git", you're installing the plugin from master, which requires Cordova 8 (cordova-android@7.x), which is version 2.12.2
of the plugin.
Use version 2.11.0
(append #2.11.0
on end of your install url)
I used bellow URL and ionic build took a long time but no error
post your platforms/android/project.properties
#
#
#
target=android-26 android.library.reference.1=CordovaLib cordova.system.library.1=com.squareup.okhttp:okhttp-urlconnection:2+ cordova.gradle.include.1=cordova-plugin-mfp/fbt-build-extras.gradle cordova.system.library.2=com.google.android.gms:play-services-analytics:+ cordova.gradle.include.2=cordova-plugin-googlemaps/fbt-build-extras.gradle cordova.gradle.include.3=cordova-plugin-googlemaps/fbt-tbxml-android.gradle cordova.system.library.3=com.google.android.gms:play-services-maps:11.8.0 cordova.system.library.4=com.google.android.gms:play-services-location:11.8.0 cordova.system.library.5=com.android.support:support-core-utils:24.1.0 cordova.system.library.6=com.android.support:support-v4:26.+ cordova.system.library.7=com.android.support:appcompat-v7:26.+ cordova.gradle.include.4=cordova-plugin-jumbomode/fbt-build.gradle cordova.gradle.include.5=cordova-plugin-mfp-push/fbt-build-extras.gradle cordova.system.library.8=com.google.android.gms:play-services-gcm:+ cordova.gradle.include.6=cordova-plugin-background-fetch/fbt-build.gradle cordova.system.library.9=com.google.android.gms:play-services-location:11.8.0 cordova.system.library.10=com.android.support:appcompat-v7:24.1.0 cordova.gradle.include.7=cordova-background-geolocation/fbt-build.gradle
A mess. All com.android.support
and play-services
version must be aligned. When you import multiple different versions, things go very bad. Your problem is related to your other 3rd party modules.
cordova.system.library.1=com.squareup.okhttp:okhttp-urlconnection:2+
cordova.gradle.include.1=cordova-plugin-mfp/fbt-build-extras.gradle
+cordova.system.library.2=com.google.android.gms:play-services-analytics:11.8.0
cordova.gradle.include.2=cordova-plugin-googlemaps/fbt-build-extras.gradle
cordova.gradle.include.3=cordova-plugin-googlemaps/fbt-tbxml-android.gradle
cordova.system.library.3=com.google.android.gms:play-services-maps:11.8.0
cordova.system.library.4=com.google.android.gms:play-services-location:11.8.0
+cordova.system.library.5=com.android.support:support-core-utils:27.0.0
+cordova.system.library.6=com.android.support:support-v4:27.0.0
+cordova.system.library.7=com.android.support:appcompat-v7:27.0.0
cordova.gradle.include.4=cordova-plugin-jumbomode/fbt-build.gradle
cordova.gradle.include.5=cordova-plugin-mfp-push/fbt-build-extras.gradle
+cordova.system.library.8=com.google.android.gms:play-services-gcm:11.8.0
cordova.gradle.include.6=cordova-plugin-background-fetch/fbt-build.gradle
cordova.system.library.9=com.google.android.gms:play-services-location:11.8.0
+cordova.system.library.10=com.android.support:appcompat-v7:27.0.0
any way to restrict this to use single versions for all app
No, wish there was. Each plugin is responsible for its own dependencies.
My plugin exposes GOOGLE_API_VERSION
, APP_COMPAT_V7_VERSION
. You'll have to consult with each of your plugins to see if they expose similar config options. If they don't, raise an issue at those plugin repos and ask them to.
Thank you for the support
can you help me with this getting error while building uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.transistorsoft:tsbackgroundfetch:0.2.0] /Users/gautam/Downloads/archive/platforms/android/build/intermediates/exploded-aar/com.transistorsoft/tsbackgroundfetch/0.2.0/AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.transistorsoft.tsbackgroundfetch" to force usage
In your config.xml
:
<platform name="android">
<preference name="android-minSdkVersion" value="16" />
it is there in config.xml
The problem is in your Cordova app.
Destroy / re-add your android platform. NOTE: You'll have to reset your changes to project.properties
above.
is this right way to do in config.xml
<plugin name="cordova-background-geolocation" spec="https://2c152****@github.com/transistorsoft/cordova-background-geolocation.git#2.11.0">
<variable name="LICENSE" value="22053*****" />
<variable name="GOOGLE_API_VERSION" value="11.8.0" />
<variable name="APPCOMPAT_VERSION" value="24.1.0" />
<variable name="BACKGROUND_MODE_LOCATION" value="<string>location</string>" />
<variable name="LOCATION_ALWAYS_AND_WHEN_IN_USE_USAGE_DESCRIPTION" value="This app requires constant access to your location in order to track your position, even when the screen is off or the app is in the background." />
<variable name="LOCATION_ALWAYS_USAGE_DESCRIPTION" value="This app requires constant access to your location in order to track your position, even when the screen is off or the app is in the background." />
<variable name="LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION" value="This app requires constant access to your location in order to track your position." />
<variable name="MOTION_USAGE_DESCRIPTION" value="Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving." />
</plugin>
Yes.
I am trying to build an existing old code base using Ionic with IBM MobileFirst. The limitation with the IBM MobileFirst is it does not work with Cordova above 7.1 version. I am facing issue while building the Android app, it throws an error using this command “ionic Cordova platform add android@6.3.0“
Installing "cordova-background-geolocation" for android Plugin doesn't support this project's cordova-android version. cordova-android: 6.3.0, failed version requirement: >=7.0.0 Skipping 'cordova-background-geolocation' for android
My package.json configuration
"cordova-background-geolocation": "git+https://2cXXXXXXXX@github.com/transistorsoft/cordova-background-geolocation.git",
Plugin list -
call-number 0.0.2 "Cordova Call Number Plugin" com.googlemaps.ios 2.6.0 "Google Maps SDK for iOS" cordova-background-geolocation 2.12.2 "BackgroundGeolocation" cordova-custom-config 5.0.2 "cordova-custom-config" cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport" cordova-plugin-background-fetch 5.4.1 "CDVBackgroundFetch" cordova-plugin-cocoalumberjack 0.0.4 "CocoaLumberjack" cordova-plugin-device 1.1.7 "Device" cordova-plugin-dialogs 1.3.4 "Notification" cordova-plugin-fingerprint-aio 1.3.3 "FingerprintAllInOne" cordova-plugin-globalization 1.11.0 "Globalization" cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin" cordova-plugin-googlemaps 2.2.5 "cordova-plugin-googlemaps" cordova-plugin-inappbrowser 1.7.2 "InAppBrowser" cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview" cordova-plugin-jumbomode 1.0 "Cordova Jumbo Mode" cordova-plugin-mfp 8.0.2017102403 "IBM MobileFirst Platform Foundation" cordova-plugin-mfp-jsonstore 8.0.2018040508 "IBM MobileFirst Platform Foundation JSONStore" cordova-plugin-mfp-push 8.0.2018040410 "IBM MobileFirst Platform Foundation - Push Notifications" cordova-plugin-network-information 1.3.4 "Network Information" cordova-plugin-okhttp 2.0.0 "OkHttp" cordova-plugin-secure-storage 2.6.8 "SecureStorage" cordova-plugin-splashscreen 4.1.0 "Splashscreen" cordova-plugin-statusbar 2.4.2 "StatusBar" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-plugin-x-toast 2.6.2 "Toast" cordova.plugins.diagnostic 3.9.2 "Diagnostic" ionic-plugin-keyboard 2.2.1 "Keyboard"
This is my system configuration
cli packages: (/usr/local/lib/node_modules)
global packages:
local packages:
System: