Please, tell us how to recreate the issue in as much detail as possible.
I have a page where I imported nativescript-geolocation and tried to enable the location services (look the code below). When I give the permission, the app crashes and exits. This shows on the terminal:
JS: [Error: Cannot enable the location service. Error: JNI Exception occurred (SIGABRT).
JS: =======
JS: Check the 'adb logcat' for additional information about the error.
JS: =======
JS: ]
I found this on adb logcat:
JNI DETECTED ERROR IN APPLICATION: JNI NewStringUTF called with pending exception java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbck;
Is there any code involved?
import * as geolocation from "nativescript-geolocation"
import { Accuracy } from "tns-core-modules/ui/enums"
export default {
async mounted () {
try {
// Check if location is enabled
const isEnabled = await geolocation.isEnabled()
// If not enabled, ask for permission
if (!isEnabled) {
await geolocation.enableLocationRequest(true, true)
// If enabled, start location watch
} else {
this.watchLocation()
}
} catch (ex) {
console.log(ex)
}
},
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
I have a page where I imported nativescript-geolocation and tried to enable the location services (look the code below). When I give the permission, the app crashes and exits. This shows on the terminal:
I found this on
adb logcat
:Is there any code involved?