background_locator icon indicating copy to clipboard operation
background_locator copied to clipboard

Data type mismatch (nullable type) and method implementation error in kotlin code just after adding the dependency

Open MorpH-ss-047 opened this issue 3 years ago • 2 comments

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.

My pubspec.yaml file:

background_locator:
    git:
      url: https://github.com/rekabhq/background_locator.git
      ref: master

I received the same error when I specified the version as defined in pub.dev instead of git.

MorpH-ss-047 avatar Mar 29 '23 12:03 MorpH-ss-047

Same here!

matheusalves753 avatar Apr 01 '23 12:04 matheusalves753