hms-flutter-plugin icon indicating copy to clipboard operation
hms-flutter-plugin copied to clipboard

Huawei push issue with the flutter 3.29.0 version

Open Muhamed-Najm opened this issue 9 months ago • 4 comments

Hi, when run the latest version that is huawei_push: ^6.12.0+303, I get this issue

I think it is from new flutter version 3.29 which i use it please check and update it. with regards.

The issue: .pub-cache/hosted/pub.dev/huawei_push-6.12.0+303/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/BackgroundMessagingService.java:27: error: cannot find symbol import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback; ^ symbol: class PluginRegistrantCallback location: interface PluginRegistry /Users/homele/.pub-cache/hosted/pub.dev/huawei_push-6.12.0+303/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java:41: error: package io.flutter.embedding.engine.plugins.shim does not exist import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry; ^ /Users/homele/.pub-cache/hosted/pub.dev/huawei_push-6.12.0+303/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 /Users/homele/.pub-cache/hosted/pub.dev/huawei_push-6.12.0+303/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 /Users/homele/.pub-cache/hosted/pub.dev/huawei_push-6.12.0+303/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 /Users/homele/.pub-cache/hosted/pub.dev/huawei_push-6.12.0+303/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 warning: unknown enum constant Mode.STRICT reason: class file for com.facebook.infer.annotation.Nullsafe$Mode not found warning: unknown enum constant Mode.STRICT 5 warning: unknown enum constant Mode.LOCAL /Users/homele/.pub-cache/hosted/pub.dev/huawei_push-6.12.0+303/android/src/main/java/com/huawei/hms/flutter/push/backgroundmessaging/FlutterBackgroundRunner.java:134: error: cannot find symbol pluginRegistrantCallback.registerWith(new ShimPluginRegistry(flutterEngine)); ^ symbol: class ShimPluginRegistry location: class FlutterBackgroundRunner Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/homele/.pub-cache/hosted/pub.dev/huawei_push-6.12.0+303/android/src/main/java/com/huawei/hms/flutter/push/utils/BundleUtils.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 7 errors 10 warnings

Muhamed-Najm avatar Apr 06 '25 13:04 Muhamed-Najm

looking forward for an official release on this, but for the mean time I'm using this temporary workaround:

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

source: https://github.com/HMS-Core/hms-flutter-plugin/issues/407#issuecomment-2700330070

tentenponce avatar Apr 09 '25 05:04 tentenponce

Huawei team, this is a major issue. Please address this!

spongyboss avatar Jul 10 '25 15:07 spongyboss

+1

matovnikov avatar Jul 22 '25 12:07 matovnikov

Any update?, this plugin does not compile with flutter 3.32.1

I think the best solution is to not add support for Huawei devices :/

YnSgC97 avatar Sep 11 '25 14:09 YnSgC97