capacitor-community / background-geolocation

A Capacitor plugin that sends you geolocation updates, even while the app is in the background.
MIT License
188 stars 57 forks source link

Android Build failing with 'cannot find symbol call.setKeepAlive(true)' #23

Closed T0BiD closed 3 years ago

T0BiD commented 3 years ago

I've built a simple Ionic App with Capacitor v3.

When trying to build this app with android studio, the build is failing with the following error:

@capacitor-community\background-geolocation\android\src\main\java\com\equimaps\capacitor_background_geolocation\BackgroundGeolocation.java:53: error: cannot find symbol
        call.setKeepAlive(true);
            ^
  symbol:   method setKeepAlive(boolean)
  location: variable call of type PluginCall
diachedelic commented 3 years ago

That's weird, Capacitor v3 definitely defines a method setKeepAlive on the type PluginCall, see source.

Is the method present in the PluginCall.java file in your project?

T0BiD commented 3 years ago

It seems like I did something wrong while setting up the project / Capacitor v3. I created a new project from scratch and the error does not appear anymore.