Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Error: Cannot read property 'GoogleApiAvailability' of undefined #109

@DavidHLau

Description

@DavidHLau

From Documentation Example: https://docs.nativescript.org/hardware/location

Android platform

Plugin: nativescript-geolocation Latest version: 4.2.3

Sample Code:

var geolocation = require("nativescript-geolocation"); 
  var location = geolocation.getCurrentLocation({ desiredAccuracy: 3, updateDistance: 10, maximumAge: 20000, timeout: 20000 }).
        then(function (loc) {
            if (loc) {
                alert("Current location is: " + loc);
            }
        }, function (e) {
            alert("Error: " + e.message); console.log("Error: " + e.message);
        });


geolocation.getCurrentLocation() **Returns:**

Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}proto: Promise[[PromiseStatus]]: "pending"[[PromiseValue]]: undefined

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions