Flutter未处理的异常:path_provider和firebase_messaging的MissingPluginException

时间:2020-05-30 15:08:56

标签: flutter firebase-cloud-messaging google-fonts

我在运行我的应用程序时遇到问题。重新启动,清洁等均无效。构建时出现错误:

E/flutter ( 6999): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method getApplicationSupportDirectory on channel plugins.flutter.io/path_provider)
E/flutter ( 6999): #0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:319:7)
E/flutter ( 6999): <asynchronous suspension>
E/flutter ( 6999): #1      MethodChannelPathProvider.getApplicationSupportPath (package:path_provider_platform_interface/src/method_channel_path_provider.dart:38:26)
E/flutter ( 6999): #2      getApplicationSupportDirectory (package:path_provider/path_provider.dart:45:39)
E/flutter ( 6999): #3      _localPath (package:google_fonts/src/google_fonts_base.dart:260:27)
E/flutter ( 6999): #4      _localFile (package:google_fonts/src/google_fonts_base.dart:265:22)
E/flutter ( 6999): #5      _saveFontToDeviceFileSystem (package:google_fonts/src/google_fonts_base.dart:273:22)
E/flutter ( 6999): #6      _httpFetchFontAndSaveToDevice (package:google_fonts/src/google_fonts_base.dart:250:17)
E/flutter ( 6999): <asynchronous suspension>
E/flutter ( 6999): #7      loadFontIfNecessary (package:google_fonts/src/google_fonts_base.dart:165:18)
E/flutter ( 6999): <asynchronous sus

然后在应用中尝试登录后

I/flutter ( 6999): MissingPluginException(No implementation found for method getToken on channel plugins.flutter.io/firebase_messaging)

pubspec.yaml:

dependencies:
  dio: 3.0.9
  google_fonts: 1.0.0
  intl: 0.16.1
  firebase_auth: ^0.15.4
  cloud_firestore: 0.13.4+2
  shared_preferences: 0.5.6+1
  firebase_core: 0.4.4+3
  firebase_database: ^3.1.1
  notification_permissions: 0.4.4
  firebase_messaging: 6.0.9
  image_picker: ^0.6.3+1
  permission_handler: 4.2.0+hotfix.3
  uuid: 2.0.4
  font_awesome_flutter: 8.5.0
  cached_network_image: ^2.0.0
  flutter_cache_manager: 1.1.3
  firebase_storage: ^3.1.1
  flutter:
    sdk: flutter

0 个答案:

没有答案