fluttercommunity / android_id

Maintainer: @nohli
https://pub.dev/packages/android_id
BSD 3-Clause "New" or "Revised" License
33 stars 15 forks source link

MissingPluginException(No implementation found for method getId on channel android_id) #60

Open tushartripathi opened 11 months ago

tushartripathi commented 11 months ago

code

const _androidIdPlugin = AndroidId(); serialNumber = await _androidIdPlugin.getId(); print(serialNumber);

error

E/flutter (24501): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method getId on channel android_id) E/flutter (24501): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7) E/flutter (24501): <asynchronous suspension> E/flutter (24501): #1 _AddEmailState.getFlutterId (package:zaperon_finlock/pages/AddEmail.dart:331:20) E/flutter (24501): <asynchronous suspension>

nohli commented 11 months ago

Hi @tushartripathi!

Thanks for opening this issue.

On which platform are you experiencing this exception?

nohli commented 11 months ago

I guess it was because calling getId() on a platform different than Android.

This is fixed in the latest version.

vipinnegi90 commented 7 months ago

image Can see this issue even on Android.

nohli commented 3 months ago

Please provide a minimal, reproducible example for debugging 🙏🏽

Please also try the latest version: 0.4.0