Skip to content

Unresolved References After Flutter 3.29.0: PluginRegistrantCallback, ShimPluginRegistry #407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hermuxo opened this issue Feb 21, 2025 · 9 comments

Comments

@hermuxo
Copy link

hermuxo commented Feb 21, 2025

After updating Flutter to version 3.29.0 (stable), the sample app does not work. The following errors appear Execution failed for task ':huawei_push:compileDebugJavaWithJavac':

import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry;
                                               ^
.pub-cache/git/hms-flutter-plugin-9d47f5aaa11d4474b37b83e42d073f05ebaa2e24/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java:47: error: cannot find symbol
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
                                              ^
  symbol:   class PluginRegistrantCallback
  location: interface PluginRegistry
.pub-cache/git/hms-flutter-plugin-9d47f5aaa11d4474b37b83e42d073f05ebaa2e24/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/BackgroundMessagingService.java:48: error: cannot find symbol
    public static void setPluginRegistrantCallback(final PluginRegistrantCallback callback) {
                                                         ^
  symbol:   class PluginRegistrantCallback
  location: class BackgroundMessagingService
.pub-cache/git/hms-flutter-plugin-9d47f5aaa11d4474b37b83e42d073f05ebaa2e24/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java:64: error: cannot find symbol
    private static PluginRegistrantCallback pluginRegistrantCallback;
                   ^
  symbol:   class PluginRegistrantCallback
  location: class FlutterBackgroundRunner
.pub-cache/git/hms-flutter-plugin-9d47f5aaa11d4474b37b83e42d073f05ebaa2e24/flutter-hms-push/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java:75: error: cannot find symbol
    public static void setPluginRegistrantCallback(final PluginRegistrantCallback callback) {
                                                         ^
  symbol:   class PluginRegistrantCallback
  location: class FlutterBackgroundRunner

Flutter 3.29.0, they removed support for the old v1 plugins.

@hermuxo hermuxo changed the title Unresolved References After Flutter 3.29.0 Update PluginRegistrantCallback, ShimPluginRegistry Unresolved References After Flutter 3.29.0: PluginRegistrantCallback, ShimPluginRegistry Feb 21, 2025
@fleoparra
Copy link

Same problem here but with flutter-hms-map

/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/utils/Convert.java:77: error: cannot find symbol
import io.flutter.view.FlutterMain;
                      ^
  symbol:   class FlutterMain
  location: package io.flutter.view
/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapController.java:85: error: cannot find symbol
    private final PluginRegistry.Registrar registrar;
                                ^
  symbol:   class Registrar
  location: interface PluginRegistry
/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapController.java:157: error: cannot find symbol
        final PluginRegistry.Registrar registrar, final int registrarActivityHashCode, final HuaweiMapOptions options) {
                            ^
  symbol:   class Registrar
  location: interface PluginRegistry
/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapBuilder.java:101: error: cannot find symbol
        final Lifecycle lifecycle, final PluginRegistry.Registrar registrar, final int activityHashCode) {
                                                       ^
  symbol:   class Registrar
  location: interface PluginRegistry
/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapFactory.java:54: error: cannot find symbol
    private final PluginRegistry.Registrar registrar;
                                ^
  symbol:   class Registrar
  location: interface PluginRegistry
/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/map/MapFactory.java:57: error: cannot find symbol
        final Lifecycle lifecycle, final PluginRegistry.Registrar registrar, final int activityHashCode) {
                                                       ^
  symbol:   class Registrar
  location: interface PluginRegistry
/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/utils/Convert.java:200: error: cannot find symbol
                        FlutterMain.getLookupKeyForAsset(Convert.toString(data.get(1))));
                        ^
  symbol:   variable FlutterMain
  location: class Convert
/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/utils/Convert.java:203: error: cannot find symbol
                        FlutterMain.getLookupKeyForAsset(Convert.toString(data.get(1)), Convert.toString(data.get(2))));
                        ^
  symbol:   variable FlutterMain
  location: class Convert
/Users/leonardo/.pub-cache/git/hms-flutter-plugin-d5eb4fa83cac759aa92205408d7d4eb6d7f516b4/flutter-hms-map/android/src/main/java/com/huawei/hms/flutter/map/utils/Convert.java:208: error: cannot find symbol
                        FlutterMain.getLookupKeyForAsset(Convert.toString(data.get(1))));
                        ^
  symbol:   variable FlutterMain
  location: class Convert

@tiltmaster
Copy link

any solution?

@hermuxo
Copy link
Author

hermuxo commented Feb 27, 2025

@tiltmaster for now you can manually go edit out those lines in the package (make a local copy).
But it seems Huawei no longer supports the Flutter platform so we are considering stopping development for App Gallery.

@JaponBaligi
Copy link

is there any reference for editting those lines? i have same issue too

@peter9teufel
Copy link

Hi!
Same issue here with hms push and hms availability. I used flutter downgrade to go back to the last version before 3.29 in the stable branch (which is provided as 3.24.5). The app build is working again for now. Hopefully Huawei does not drop development for their flutter plugins, hoping for a fix.

Best regards,
Peter

@crasowas
Copy link

crasowas commented Mar 5, 2025

For the flutter-hms-push plugin, here is a temporary solution. Update your pubspec.yaml:

dependencies:
  huawei_push:
    git:
      url: https://github.com/crasowas/hms-flutter-plugin.git
      path: flutter-hms-push

@hermuxo
Copy link
Author

hermuxo commented Mar 5, 2025

Thanks! Huawei please respond soon with some indication that you are still committed to support Flutter 🙏.
We'll probably stop supporting Huawei App Gallery if we don't get some feedback

@fleoparra
Copy link

For the flutter-hms-map plugin there are some commits and you can use as a temporary solution.

  huawei_map:
    git:
      url: https://github.com/fleoparra/hms-flutter-plugin.git
      path: flutter-hms-map

@alex-dokienko
Copy link

same issue for push lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants