MissingPluginException(No implementation found for method getInstalledApps on channel installed_apps) - flutter

MissingPluginException(No implementation found for method getInstalledApps on channel installed_apps)
E/flutter ( 4648): <asynchronous suspension>
These errors are occured when i try to get the list of installed apps from installed_apps package from flutter.
This is my code:
List<AppInfo> apps = await InstalledApps.getInstalledApps();

Related

Flutter custom native plugin conflicts with project code

For the Flutter app I’m working on, the company had a third party develop native Android and iOS code for an alarm to integrate into our app. I ran their sample app that they made and it ran just fine.
I copied the code over to my project and kept getting this error.
E/flutter (17290): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method alarmStatus on channel samples.flutter.dev/alarmStatus)
E/flutter (17290): #0 MethodChannel._invokeMethod
E/flutter (17290): #1 _MyHomePageState._getAlarmStatus
E/flutter (17290): <asynchronous suspension>
E/flutter (17290):
E/flutter (17290): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method alarmStatus on channel samples.flutter.dev/alarmStatus)
E/flutter (17290): #0 MethodChannel._invokeMethod
E/flutter (17290): <asynchronous suspension>
E/flutter (17290): #1 _MyHomePageState._getAlarmStatus
E/flutter (17290): <asynchronous suspension>
E/flutter (17290):
So, I created a new project and copied the code over and it worked great. While doing some troubleshooting, we found out that this issue sometimes appears with dependencies having issues with each other, so I copied all my dependencies from my app to the new project and got the same error. After commenting out dependencies to find which one may be causing the issue, I landed at the audio_service package. We did some more searching through forums and all, but weren’t able to figure out a solution.
Has anyone run into this issue before and been able to figure out what’s going on? Or have any ideas of what I can try?
I got the recommendation of having the other developers redo the native stuff with a different dependency, but I'm hoping to avoid that if possible.

Flutter :No implementation found issue in path_provider while using get_storage in WorkManager

I am Using the GetStorage plugin With Workmanager and trying to access stored data in the Background its through error
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)
E/flutter (11718): #0 GetStorage._init (package:get_storage/src/storage_impl.dart:47:7)
E/flutter (11718):
E/flutter (11718): #1 new GetStorage._internal. (package:get_storage/src/storage_impl.dart:28:7)
E/flutter (11718):
E/flutter (11718): #2 callbackDispatcher (package:anganwadimapping/backgroundProcessCallback.dart:8:3)
E/flutter (11718):
E/flutter (11718):
I think there is no way u can get access to local stored with workmanager when the app closed .
U can Explain ur problem maybe we find another way

i keep having [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core) #0 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:175 #1 MethodChannel.invokeListMethod package:flutter/…/services/platform_channel.dart:363 #2 MethodChannelFirebase._initializeCore package:firebase_core_platform_interface/…/method_channel/method_channel_firebase.dart:31 #3 MethodChannelFirebase.initializeApp package:firebase_core_platform_interface/…/method_channel/method_channel_firebase.dart:73 #4 Firebase.initializeApp
delete the application on your emulator (or wherever you work)
execute
flutter clean
in your working directory and rebuild the app.
flutter sometimes does not recognize plugins automatically.
I had this error and deleting app on device/simulator and installing it again helped me

MissingPluginException for quick_actions plugin in release mode

I recently added quick_actions plugin works fine in debug mode but shows a blank screen in release mode.
Found these issues in the log.
[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method getLaunchAction on channel plugins.flutter.io/quick_actions)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157)
<asynchronous suspension>
#1 QuickActions.initialize (package:quick_actions/quick_actions.dart:68)
[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method setShortcutItems on channel plugins.flutter.io/quick_actions)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157)
I found the same issue for google_fonts package. As of now to remove this issue from the release mode I added shrinkResources false in the app level build.grade file of android folder. Let me know if this helps.

MissingPluginException(No implementation found for method pickImage on channel plugins.flutter.io/image_picker)

Unhandled Exception: MissingPluginException(No implementation found for method pickImage on channel plugins.flutter.io/image_picker)
E/flutter (16028): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:7)
E/flutter (16028): <asynchronous suspension>
E/flutter (16028): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:334:12)
E/flutter (16028): #2 MethodChannelImagePicker.pickImagePath (package:image_picker_platform_interface/src/method_channel/method_channel_image_picker.dart:62:21)
E/flutter (16028): #3 MethodChannelImagePicker.pickImage (package:image_picker_platform_interface/src/method_channel/method_channel_image_picker.dart:30:25)
E/flutter (16028): #4 ImagePicker.getImage (package:image_picker/image_picker.dart:101:21)
STEP 1 : Ensure you have imported the plugin by including this in your pubspec.yaml file
image_picker: ^0.6.7+4
STEP 2 : Make sure you have imported the plugin in the file you need it
import 'package:image_picker/image_picker.dart';
STEP 3 : Make sure you run this command
flutter pub get
Now, many times in Flutter even after doing the above 3 steps perfectly you will get the same error.
Here is my solution that has worked for me.
STEP 1 : Run this command in the terminal
flutter clean
STEP 2 : CLOSE/STOP your emulator and start it again
99% of the time this works for me.
just click stop red icon right side of run icon. and restart app