cordova-plugin-background-geolocation: Unable to generate signed apk
Your Environment
- Plugin version: 3.1.0
- Platform: Android
- OS version:
- Device manufacturer and model:
- Running in Simulator:
- Cordova version (
cordova -v
): — Capacitor with navite plugin - Cordova platform version (
cordova platform ls
): — - Plugin configuration options:
- Link to your project:
Context
Trying generating signed apk in android studio.
Expected Behavior
Actual Behavior
Gets error:
- Type org.apache.commons.io.Charsets is defined multiple times
- com.android.tools.r8.CompilationFailedException: Compilation failed to complete
Possible Fix
Steps to Reproduce
Plugins: @mauron85/cordova-plugin-background-geolocation (3.1.0) cordova-plugin-actionsheet (2.3.3) cordova-plugin-badge (0.8.8) cordova-plugin-device (2.0.3) cordova-plugin-dialogs (2.0.2) cordova-plugin-ionic (5.4.7) cordova-plugin-whitelist (1.3.4) cordova-sms-plugin (1.0.0) uk.co.workingedge.phonegap.plugin.launchnavigator (5.0.4)
Context
Problem appears only on signed apk
Debug logs
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17
Commits related to this issue
- Update plugin.xml Removed confilict Charsets import as per stated here https://github.com/mauron85/cordova-plugin-background-geolocation/issues/707#issuecomment-654706152 — committed to jasonfish568/cordova-plugin-background-geolocation by jasonfish568 2 years ago
- Update dependencies.gradle Updated as per stated here https://github.com/mauron85/cordova-plugin-background-geolocation/issues/707#issuecomment-654706152 — committed to jasonfish568/cordova-plugin-background-geolocation by jasonfish568 2 years ago
- Update dependencies.gradle Updated as per stated here https://github.com/mauron85/cordova-plugin-background-geolocation/issues/707#issuecomment-654706152 — committed to jasonfish568/cordova-plugin-background-geolocation by jasonfish568 2 years ago
I’ve created fork to solve this problem https://github.com/darron1217/cordova-plugin-background-geolocation/tree/bugfix
You can install it by
npm install https://github.com/darron1217/cordova-plugin-background-geolocation.git#bugfix
@LgArcida this is how you fix it
I’m not a maintainer of the project (or connected to it). In the workaround that worked for me I physically copied the file to plugin’s location for string.xml
Can’t really help you more than that, I do not know plugin’s internals.
In our case it was a bit of a pain to make it work with capacitor/ionic combo.
Awesome work @darron1217 that saved the day!
I had the same issue while trying to sign the app. It was working without signing. Can we get this merged @mauron85? 🙏
In appflow now I have progress, and getting the same thing mentioned here https://github.com/mauron85/cordova-plugin-background-geolocation/issues/562#issuecomment-588174021