Dart Unhandled Exception: MissingPluginException(No implementation found for method getAll - android

Error :
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel dev.fluttercommunity.plus/package_info)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)
<asynchronous suspension>
#1 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:377:43)
<asynchronous suspension>
#2 MethodChannelPackageInfo.getAll (package:package_info_plus_platform_interface/method_channel_package_info.dart:13:17)
<asynchronous suspension>
#3 PackageInfo.fromPlatform (package:package_info_plus/package_info_plus.dart:36:26)
<asynchronous suspension>
I don't know where this error come from

Face the same issue while using
package_info_plus: ^3.0.2
Issue solved after completely restart the app/service

Related

Build failed after installing firebase

Just started Flutter course from freecodecamp and can't resolve this problem for couple of hours... I have installed firebase plugins, all are in pubspec.yaml
firebase_core: ^1.17.1
firebase_auth: ^3.3.19
cloud_firestore: ^3.1.17
firebase_analytics: ^9.1.9
like in course video have to change in android/app/build.gradle
defaultConfig {minSdkVersion 19 and add
multiDexEnlabed true}
its and dependency
dependencies{
implementation 'com.android.support:multidex:1.0.3'}
in course it goes well but i have this issue:
Launching lib\main.dart on ONEPLUS A6003 in debug mode...
lib\main.dart:1
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\dev\projects flutter\notatki\android\app\build.gradle' line: 28
* What went wrong:
A problem occurred evaluating project ':app'.
> No signature of method: build_9s4pif6pkcf99jbjr51rbhd01.android() is applicable for argument types: (build_9s4pif6pkcf99jbjr51rbhd01$_run_closure2) values: [build_9s4pif6pkcf99jbjr51rbhd01$_run_closure2#6e3389a0]
* Try:> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
when i run app in flutter run -v in terminal it gives me some more:
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:699:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1183:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:94:3)
<asynchronous suspension>
Was trying to change minSdkVersion, target, compile, changing versions of firebase (in dependency, was not downloading it.....) all not work.
But when i'll comment out all installed firebase dependences, multiDexEnlabed true and this implementation 'com.android.support:multidex:1.0.3'
this demo application just works fine

I face that error when i use url lancher packege in flutter

I try to run a url using url lancher package
https://pub.dev/packages/url_launcher
and i got this error , i use a package to display my app over apps , using that package https://pub.dev/packages/flutter_overlay_window , and i added a button inside the overlay and when i press it it supposed to send a message to whatsapp using url lancher package , but the problem is that when your app is over apps you will get that error :
E/flutter (24166): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(NO_ACTIVITY, Launching a URL requires a foreground activity., null, null)
E/flutter (24166): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter (24166): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)E/flutter (24166): <asynchronous suspension>
E/flutter (24166): #2 launchUrlString (package:url_launcher/src/url_launcher_string.dart:39:10)
E/flutter (24166): <asynchronous suspension>
E/flutter (24166): #3 launchUrl (package:url_launcher/src/url_launcher_uri.dart:57:10)

Flutter Android Release Build CRASH - FirebaseCore Initialize App Issue

Currently creating an app with Flutter.
I have created an issue on the official github but figured I'd ask here too if thats cool.
Steps To Reproduct:
flutter run --release
Install on Android device (reproduced on multiple)
App will hang when attempting Firebase.initializeApp()
NOTE
I do not personally think this is a firebase issue but when we all had to update our app for AndroidX compatibility and firebase_message also called for us to create the Application.kt file to implement it's newest pubs (which I need to use due to other dependencies).
ANY HELP WOULD BE GREATLY APPRECIATED. I really think this has something to do with the Kotlin files. I say that BECAUSE I MOVED THE AWAIT FIREBASE>INITAPP call in the main.dart file lower, and I got the same kind of output but instead referencing the SharedPrefs pub I was using.
Make sense?
What do YOUR Kotlin files look like?
Main.Dart File:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
await SharedPreferences.getInstance();
Admob.initialize();
await Admob.requestTrackingAuthorization();
DynamicLinkService.handleDynamicLinks();
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitDown, DeviceOrientation.portraitUp]).then(
(_) {
runApp(
StringConstants(
child: AuthProvider(auth: Auth(), child: MyApp()),
),
);
},
);
}
pubspec.yaml
version: 1.0.0+29
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
firebase_core: "^0.5.3"
# Newly reworked plugins covered by this migration guide:
firebase_auth: "^0.18.4"
cloud_firestore: "^0.14.4"
cloud_functions: "^0.7.2"
firebase_storage: "^5.2.0"
firebase_messaging: ^7.0.3 # Updated to work with new core only plugins (no new changes):
firebase_admob: "^0.10.3"
firebase_analytics: "^6.3.0"
firebase_dynamic_links: "^0.6.3"
Output:
E/flutter (27399): [ERROR:flutter/lib/ui/ui_dart_state.cc(184)] Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core)
E/flutter (27399): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:160)
E/flutter (27399): <asynchronous suspension>
E/flutter (27399): #1 MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:348)
E/flutter (27399): <asynchronous suspension>
E/flutter (27399): #2 MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:30)
E/flutter (27399): <asynchronous suspension>
E/flutter (27399): #3 MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:75)
E/flutter (27399): <asynchronous suspension>
E/flutter (27399): #4 Firebase.initializeApp (package:firebase_core/src/firebase.dart:43)
E/flutter (27399): <asynchronous suspension>
E/flutter (27399): #5 main (package:instapray/main.dart:20)
E/flutter (27399): <asynchronous suspension>
E/flutter (27399):
MainActivity.kt:
class MainActivity: FlutterActivity() {
}
Application.kt:
import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService
class Application:FlutterApplication(), PluginRegistrantCallback {
override fun onCreate() {
super.onCreate()
FlutterFirebaseMessagingService.setPluginRegistrant(this)
}
override fun registerWith(registry:PluginRegistry) {
io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
}
}
This involved an update to the core Firebase pubs. Thanks.

Unhandled Exception: MissingPluginException(No implementation found for method share on channel plugins.flutter.io/share)

I am using flutter share plugin version ^0.6.5+2 with firebase dynamic link. The plugin works fine when run in debug mode but when I create release apk using
flutter build apk --release
or flutter run --release, the share plugin gives error
E/flutter (17160): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: MissingPluginException(No implementation found for method share
on channel plugins.flutter.io/share)
E/flutter (17160): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159)
E/flutter (17160): <asynchronous suspension>
E/flutter (17160): <asynchronous suspension>
E/flutter (17160):
I have tried running Flutter clean and then build or run again but still it gives the same error

Flutter | NoSuchMethodError: The method 'round' was called on null. E/flutter (25849): Receiver: null

Constantly getting this error since i override the ErrorWidget.builder in the main function. I only see the exception i navigate to a specific widget(Not initially. I be on the page for few minutes, this starts getting printed automatically in console gradually & keeps printing. Once this error appears on console, i see this error every time i tap on something. package:flutter/src/widgets/navigator.dart': Failed assertion: line 1748 pos 12: '!_debugLocked': is not true. ) . The problem i face is , i don't know where to lookup for the reason..came up all in sudden today & i have no clue to debug. Has anybody else seen this error before ??
E/flutter (25849): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The method 'round' was called on null.
E/flutter (25849): Receiver: null
E/flutter (25849): Tried calling: round()
E/flutter (25849): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
E/flutter (25849): #1 PageController.nextPage (package:flutter/src/widgets/page_view.dart:227:31)
E/flutter (25849): #2 _CarouselSliderState.getTimer.<anonymous closure> (package:carousel_slider/carousel_slider.dart:172:14)
E/flutter (25849): #3 _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (25849): #4 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (25849): #5 _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (25849): #6 _CustomZone.bindUnaryCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1024:26)
E/flutter (25849): #7 _rootRunUnary (dart:async/zone.dart:1196:13)
E/flutter (25849): #8 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (25849): #9 _CustomZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:1008:26)
E/flutter (25849): #10 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
E/flutter (25849): #11 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
E/flutter (25849): #12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
E/flutter (25849):
if you use carousel_pro. it's from the plugin src.
try update
if ((_controller.page!=null) && (_controller.page.round() == widget.images.length - 1)) {
I already create pull request to the source. hope it will be updated.
cheers

Categories

Resources