Unresolved reference: setPluginRegistrant

See original GitHub issue

Hi, @mehdok ! I’m trying to use a code in MainActivity.kt:

` import io.flutter.app.FlutterApplication import io.flutter.plugin.common.PluginRegistry import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback import io.flutter.plugins.pathprovider.PathProviderPlugin import io.flutter.view.FlutterMain import rekab.app.background_locator.IsolateHolderService

class Application : FlutterApplication(), PluginRegistrantCallback { override fun onCreate() { super.onCreate() IsolateHolderService.setPluginRegistrant(this) FlutterMain.startInitialization(this) }

  override fun registerWith(registry: PluginRegistry?) {
      if (!registry!!.hasPlugin("io.flutter.plugins.pathprovider")) {
          PathProviderPlugin.registerWith(registry.registrarFor("io.flutter.plugins.pathprovider"))
      }
  }

} `

but I receive an error: ’ Unresolved reference: setPluginRegistrant’ Could you please help me with that?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

3reactions
mehdokcommented, Feb 17, 2021

Which version of the plugin you are using?

I can see you have LocatorBroacastReceiver in your Manifest which is removed from the latest version.

2reactions
dimas0211commented, Feb 17, 2021

Yeah, worked out! Thank you a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application.kt: Unresolved reference: firebasemessaging
I am trying to update firebase_messaging to the new version 8.0.0-dev.10 . However, I am getting these errors: Running Gradle task ' ...
Read more >
Unresolved reference: setPluginRegistrant · Issue #202 - GitHub
Hi, @mehdok ! I'm trying to use a code in MainActivity.kt: ` import io.flutter.app.FlutterApplication import io.flutter.plugin.common.
Read more >
Unresolved reference: setPluginRegistrant show flutter when ...
Unresolved reference : setPluginRegistrant show flutter when changed firebase_messaging: 10.0.0. my app uses google login and facebook login.
Read more >
Application.kt Flutter app error - Help/Discuss - Gradle Forums
onCreate() FlutterFirebaseMessagingService.setPluginRegistrant(this) } ... 9): Unresolved reference: FirebaseCloudMessagingPluginRegistrant.
Read more >
How to fix unresolved reference error in android studio, kotlin ...
This video will show you how to fix the " unresolved reference " error in Android studio for kotlin. apply plugin: 'com.android.application' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found