HaylLtd / cordova-background-geolocation-plugin

Background and foreground geolocation plugin for Cordova.
Apache License 2.0
57 stars 66 forks source link

Failure Build with AAPT: error: attribute android:foregroundServiceType not found #82

Closed erlanggahario closed 1 year ago

erlanggahario commented 2 years ago

Hello,

I try to use this plugin to my cordova project. when I build android, i got build failed result with details below :

FAILURE: Build failed with an exception.

my cordova project spec :

9.0.0 (cordova-lib@9.0.1) android 8.1.0

cordova-background-geolocation-plugin 2.0.4 "cordova-background-geolocation-plugin" cordova-plugin-androidx 3.0.0 "cordova-plugin-androidx" cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter" cordova-plugin-camera 4.1.0 "Camera" cordova-plugin-device 2.1.0 "Device" cordova-plugin-dialogs 2.0.2 "Notification" cordova-plugin-file 6.0.2 "File" cordova-plugin-file-transfer 1.7.1 "File Transfer" cordova-plugin-geolocation 4.1.0 "Geolocation" cordova-plugin-inappbrowser 4.1.0 "InAppBrowser" cordova-plugin-media 5.0.4 "Media" cordova-plugin-media-capture 3.0.3 "Capture" cordova-plugin-network-information 3.0.0 "Network Information" cordova-plugin-screen-orientation 3.0.2 "Screen Orientation" cordova-plugin-whitelist 1.3.5 "Whitelist" es6-promise-plugin 4.2.2 "Promise"

HarelM commented 2 years ago

This attribute is needed for sdk api 29 or 30 I think... Are you trying to compile to latest version? You can use an easier version of this plugin if you need to compile to an older version...

erlanggahario commented 2 years ago

wow thank you. after i upgrade android platform to 9.1.0 it build successfully. but when i run on emulator i've got app crash with java.lang.SecurityException error

java.lang.RuntimeException: Unable to create service com.marianhello.bgloc.service.LocationServiceImpl: java.lang.SecurityException: uid 10121 cannot explicitly add accounts of type: com.cri.ema0.account

did i miss something?

HarelM commented 2 years ago

No clue what this error is...

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.