I was running the example app when I encountered this error, the same error occurs even if I don't import or use the library build my app after installing the library. To cross check I created a fresh flutter project, added the dependency, and flutter run then also I received the same error
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (25, 1): Class 'BackgroundLocatorPlugin' is not abstract and does not implement abstract member public abstract fun onNewIntent(p0: Intent): Boolean defined in io.flutter.plugin.common.PluginRegistry.NewIntentListener
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (215, 43): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (215, 48): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (224, 43): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (224, 48): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (243, 43): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (243, 48): Type mismatch: inferred type is Map<Any, Any>? but Map<Any, Any> was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (266, 5): 'onNewIntent' overrides nothing
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\BackgroundLocatorPlugin.kt: (275, 35): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\IsolateHolderExtension.kt: (42, 27): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\IsolateHolderService.kt: (269, 35): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\pluggables\DisposePluggable.kt: (17, 51): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: C:\Users\userName\AppData\Local\Pub\Cache\git\background_locator-741dc82ad706cb1a6361a4f60b59a37b8254f142\android\src\main\kotlin\rekab\app\background_locator\pluggables\InitPluggable.kt: (22, 55): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
FAILURE: Build failed with an exception.
I was running the example app when I encountered this error, the same error occurs even if I don't import or use the library build my app after installing the library. To cross check I created a fresh flutter project, added the dependency, and
flutter run
then also I received the same errorMy
pubspec.yaml
file:I received the same error when I specified the version as defined in pub.dev instead of git.