Flutter throws MissingPluginException for a plugin method
MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)Short answer
MissingPluginException means Dart called a plugin whose native half is not in the running app. The usual causes are a plugin added while the app was running, so only a full stop and run installs its native code, or a call from a background isolate that was not set up for plugins. Fix the one that matches.
Fix it fast
1Find out which cause you have
Fully stop the app and run it again. Hot reload and hot restart only update Dart code, so this settles the most common cause in one step.
flutter pub get flutter run2Match what you see, then jump to its fix
What does the error look like?
MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
Cause 1 of 2
The plugin was added while the app was running
1Check
A plugin with Kotlin, Java, Swift or Objective-C code must be built into the app. Check that it is listed in pubspec.yaml and fetched.
grep -n shared_preferences pubspec.yaml pubspec.lock2Fix
Run flutter pub get, stop the app, and start it again. Do not use hot restart for this.
flutter pub get
flutter run3Verify
Call the plugin method again and confirm there is no exception.
flutter runConfirmed by docs.flutter.dev
Cause 2 of 2
The call comes from a background isolate
1Check
Plugins and channels work in the root isolate, or in an isolate registered as a background isolate. Look for plugin calls inside spawned code.
grep -rn "Isolate.spawn" lib/2Fix
Pass the root isolate token into the new isolate and initialise the background messenger before using any plugin there.
import 'package:flutter/services.dart';
void _isolateMain(RootIsolateToken token) async {
BackgroundIsolateBinaryMessenger.ensureInitialized(token);
// plugins can be used here
}
void main() {
final token = RootIsolateToken.instance!;
Isolate.spawn(_isolateMain, token);
}3Verify
Run the isolate and confirm the plugin call returns.
flutter runConfirmed by docs.flutter.dev
How do I stop it coming back?
- After adding or removing a plugin, run flutter pub get and do a full stop and run.
- Keep plugin calls in the root isolate unless the plugin documents background use.
- Run flutter pub upgrade for plugins on a schedule, not only when something breaks.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
- Qist BazaarA buy-now-pay-later marketplace built from a blank repo, now past 100K downloads on Google Play.
Related fixes
Mobile apps
Google Play says the app does not support 16 KB memory pages
check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a
Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.
5 causes, each with a fixMobile apps
Gradle cannot find com.google.firebase:firebase-analytics-ktx
Required by: project :app
Firebase moved the Kotlin extensions into the main modules and stopped releasing the -ktx modules in July 2025.
2 causes, each with a fixMobile apps
Gradle cannot create LibraryVariantBuilderImpl in a Flutter Android build
Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl
This error appears when the Android Gradle plugin (AGP) cannot run in the Gradle or IDE you use.
3 causes, each with a fixMobile apps
Flutter release build cannot open the keystore: HmacPBESHA256 not available
Algorithm HmacPBESHA256 not available
The keystore is a PKCS12 file protected by a newer algorithm than the Java that is reading it understands.
3 causes, each with a fixMobile apps
Android install error: the package conflicts with an existing package of the same name
The package conflicts with an existing package by the same name
Android allows only one app per application ID, and an update must be signed with the same certificate as the installed version.
3 causes, each with a fixMobile apps
Android resource linking fails with resource android:attr/lStar not found
error: failed linking references.
The lStar attribute exists only from Android API 31.
2 causes, each with a fix