Skip to content

Build failed with an exception: not updated to support the latest Flutter embedding (v2) #35

@joelfunk

Description

@joelfunk

Your Environment

  • Plugin version: 1.1.0
  • Platform: Android
  • OS version: Android 15
  • Device manufacturer / model: Galaxy S24 / SM-S921U1
  • Flutter info (flutter info, flutter doctor):
Doctor summary (to see all details, run flutter
doctor -v):
[√] Flutter (Channel stable, 3.29.3, on Microsoft
    Windows [Version 10.0.26100.6584], locale     
    en-US)
[√] Windows Version (11 Home 64-bit, 24H2, 2009)
[√] Android toolchain - develop for Android
    devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual  
    Studio Community 2022 17.5.1)
[!] Android Studio (version 2023.3)
    X Unable to determine bundled Java version.   
[√] Android Studio (version 2024.3)
[√] VS Code, 64-bit edition (version 1.103.2)     
[√] Connected device (4 available)
[√] Network resources
  • Plugin config
      // 1.  First configure the Firebase Adapter.
      BackgroundGeolocationFirebase.configure(BackgroundGeolocationFirebaseConfig(
        locationsCollection: '/$handle/users/users/$email/location/location', // even number of segments for updateSingleDocument to work
        geofencesCollection: '/$handle/users/users/$email/location/location',
        updateSingleDocument: true
      ));
      // 2.  Configure BackgroundGeolocation as usual.
      bg.BackgroundGeolocation.onLocation((bg.Location location) {
        print('[location] $location');
      });

      bg.BackgroundGeolocation.ready(bg.Config(
        debug: false,
        desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
        locationAuthorizationRequest: 'WhenInUse',
        stopOnTerminate: true, // false for ongoing operation.
        startOnBoot: false)
      );

To Reproduce
Steps to reproduce the behavior:

  1. Configure plugin for use as per documentation
  2. Update to Flutter version 3.29.3
  3. Build Fails:
error: cannot find symbol
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                  ^
  symbol:   class Registrar
  location: interface PluginRegistry
...
public static void registerWith(Registrar registrar) {
                                ^
  symbol:   class Registrar
  location: class BackgroundGeolocationFirebasePlugin
...
public static void setPluginRegistrant(PluginRegistry.PluginRegistrantCallback callback) {
                                                     ^
  symbol:   class PluginRegistrantCallback
  location: interface PluginRegistry

Debug logs

  • ios XCode logs,
  • Android: $ adb logcat

Additional context
When I checkout Flutter version 3.24.5, it works perfectly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions