mauron85/cordova-plugin-background-geolocation

Issue when compiling with project targetin sdk 31.

fathanyr opened this issue · 1 comments

I try to install and use this plugin from ionic native [https://ionicframework.com/docs/v5/native/background-geolocation](Ionic Native Background Geolocation). But get an error when build it with sdk 31.

Your Environment

Ionic:

Ionic CLI : 6.18.1 (C:\Users\GIT\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 5.9.1
@angular-devkit/build-angular : 12.1.4
@angular-devkit/schematics : 12.1.4
@angular/cli : 12.1.4
@ionic/angular-toolkit : 4.0.0

Capacitor:

Capacitor CLI : 3.2.5
@capacitor/android : 3.3.3
@capacitor/core : 3.3.3
@capacitor/ios : 3.3.3

Utility:

cordova-res : 0.15.4
native-run : 1.5.0

System:

NodeJS : v16.13.0 (C:\Program Files\nodejs\node.exe)
npm : 8.1.0
OS : Windows 10

Context

Cannot compiled since it's say not supported in SDK 31.

Expected Behavior

Can be compiled

Actual Behavior

image

Possible Fix

Upgrade compatibility to Android SDK 31

Steps to Reproduce

  1. Init ionic capacitor project.
  2. Set compileSdkVersion and targetSdkVersion to 31.
  3. Build the app in Android Studio.

Context

I try to use this background location for detecting the mock location in Ionic Capacitor.

Debug logs

--

Also facing this issue with Ionic Cordova