Questions tagged «flutter-dependencies»



5
无法将PluginRegistry转换为FlutterEngine
将flutter更新到1.12.13版后,我立即发现了此问题,无法解决。我按照firebase_messaging教程的指示发送了错误消息:“错误:不兼容的类型:PluginRegistry无法转换为FlutterEngine GeneratedPluginRegistrant.registerWith(注册表);”我的代码如下: package io.flutter.plugins; import io.flutter.app.FlutterApplication; import io.flutter.plugin.common.PluginRegistry; import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback; import io.flutter.plugins.GeneratedPluginRegistrant; import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService; import android.app.NotificationChannel; import android.app.NotificationManager; import android.os.Build; public class Application extends FlutterApplication implements PluginRegistrantCallback { @Override public void onCreate() { super.onCreate(); FlutterFirebaseMessagingService.setPluginRegistrant(this); if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){ NotificationChannel channel = new NotificationChannel("messages","Messages", NotificationManager.IMPORTANCE_LOW); NotificationManager manager = getSystemService(NotificationManager.class); manager.createNotificationChannel(channel); } …


3
颤振:错误:找不到吸气剂:'挂起'。案例AppLifecycleState.suspending
尝试在本地iOS模拟器上启动应用程序时,我刚刚在稳定通道上升级了Flutter并获得了以下StackTrace。使用进行单元测试flutter test也会受到影响。 Launching lib/main.dart on iPhone 8 in debug mode... Compiler message: ../../flutter/.pub-cache/hosted/pub.dartlang.org/native_device_orientation-0.1.2/lib/native_device_orientation.dart:149:30: Error: Getter not found: 'suspending'. case AppLifecycleState.suspending: ^^^^^^^^^^ Target kernel_snapshot failed: Exception: Errors during snapshot creation: null Failed to build bundle. Error launching application on iPhone 8. 扑医生-v [✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.