MissingPluginException for quick_actions plugin in release mode - flutter

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.

Related

Flutter camera issue in android version 13

In android 13 we are facing the below issue we are using this third party camera plugin (https://pub.dev/packages/camera), I would really appreciate the help to solve the issue, Do we need to make some changes in our android version?
E/flutter (14764): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: CameraException(error, Attempt to invoke virtual method 'int android.media.EncoderProfiles$VideoProfile.getWidth()' on a null object reference)
E/flutter (14764): #0 AndroidCamera.createCamera (package:camera_android/src/android_camera.dart:112:7)
E/flutter (14764):
E/flutter (14764): #1 CameraController.initialize (package:camera/src/camera_controller.dart:291:19)
E/flutter (14764):
It's a well known issue that is being tracked here:https://github.com/flutter/flutter/issues/109769
some people came with a solution ( that I haven't tried ) but as of the current state the issue is still not fixed in the latest package version

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

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();

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

Exception in flutter mobile_number package

I use mobile_number plugin, when try to implement example code I have a error:
ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method hasPhonePermission on channel mobile_number)
E/flutter (11696): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7)
E/flutter (11696): <asynchronous suspension>
E/flutter (11696): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
E/flutter (11696): #2 MobileNumber.hasPhonePermission (package:mobile_number/mobile_number.dart:32:24)
The line which generate error is:
if (!await MobileNumber.hasPhonePermission) {
I use Flutter 1.22.6 • channel stable
mobile_number: ^1.0.3
What is the reason and how to avoid such a mistake?
p/s
I installed permissions in Manifest:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
<uses-permission android:name="android.permission.ANSWER_PHONE_CALLS"/>
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
This is most likely due to the fact that you added the plugin and didn't rebuild your app again. Given that you followed the documentation on the pluginpage and added the mainactivity java requirements correct as instructed.
1- Close your emulator\debugging session.
2- Run flutter clean.
3- Give it a new try and it should work, update on the results of these steps please.

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