Skip to content

Android. NoSuchMethodError (NoSuchMethodError: No top-level getter '_registerPlugins' declared. #77680

@ekasetiawans

Description

@ekasetiawans

I am developing a plugin that execute dartCallback in background service.
But I got this exception when I run the example app.

NoSuchMethodError (NoSuchMethodError: No top-level getter '_registerPlugins' declared.

Steps to Reproduce

  1. Clone https://github.com/ekasetiawans/flutter_background_service
  2. Run example project on Android
  3. Exception thrown

Expected results:
Exception not thrown.

Actual results:
Exception thrown.

Logs
ekasetiawans@MacBookPro ~ % flutter doctor -v
[✓] Flutter (Channel stable, 2.0.1, on macOS 11.2.3 20D91 darwin-x64, locale
    en-ID)
    • Flutter version 2.0.1 at /Users/ekasetiawans/Development/flutter-stable
    • Framework revision c5a4b4029c (5 days ago), 2021-03-04 09:47:48 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/ekasetiawans/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.54.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.20.0

[✓] Connected device (3 available)
    • sdk gphone x86 64 arm64 (mobile) • emulator-5554 • android-x64    •
      Android 11 (API 30) (emulator)
    • macOS (desktop)                  • macos         • darwin-x64     • macOS
      11.2.3 20D91 darwin-x64
    • Chrome (web)                     • chrome        • web-javascript • Google
      Chrome 87.0.4280.88

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: regressionIt was better in the past than it is nowtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions