rekabhq / background_locator

A Flutter plugin for updating location in background.
MIT License
289 stars 330 forks source link

Execution failed for task ':background_locator:compileDebugKotlin' after Upgrading to Flutter 3.0.0 #333

Open sultan18kh opened 2 years ago

sultan18kh commented 2 years ago

Was working fine before. But started facing this issue after upgrading to Flutter 3.0.0.

e: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/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: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/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: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/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: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/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: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/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: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/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: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/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: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/android/src/main/kotlin/rekab/app/background_locator/BackgroundLocatorPlugin.kt: (266, 5): 'onNewIntent' overrides nothing
e: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/android/src/main/kotlin/rekab/app/background_locator/BackgroundLocatorPlugin.kt: (275, 35): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/android/src/main/kotlin/rekab/app/background_locator/IsolateHolderExtension.kt: (42, 27): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/android/src/main/kotlin/rekab/app/background_locator/IsolateHolderService.kt: (269, 35): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/android/src/main/kotlin/rekab/app/background_locator/pluggables/DisposePluggable.kt: (17, 51): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
e: /opt/homebrew/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/background_locator-1.6.12/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.

* What went wrong:
Execution failed for task ':background_locator:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

* 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 18s
Exception: Gradle task assembleDebug failed with exit code 1
Exited
yakupbaser commented 2 years ago

is there any update for that error?

abdulsalamaljamal commented 2 years ago

Facing same error after upgrading to flutter 3.0.0.

DarshitAnjaria commented 2 years ago

Facing the same issue.

venkateshkadalii commented 2 years ago

Facing the same issue, after upgrading flutter sdk to latest. Any fix?

as2a3 commented 2 years ago

This fork fixed my code Answer

Edit in pubspec.yaml file background_locator: git: url: https://github.com/caiobraga/background_locator

Capture

HaAnhHung commented 2 years ago

This fork fixed my code Answer

Edit in pubspec.yaml file background_locator: git: url: https://github.com/caiobraga/background_locator

Capture

I try this but after that, I have another problem when building release but building debug it is ok Screen Shot 2022-09-21 at 11 47 37

as2a3 commented 2 years ago

I try this but after that, I have another problem when building release but building debug it is ok Screen Shot 2022-09-21 at 11 47 37

Really sorry. I had to downgrade flutter version to fix this problem.

I can not find the solution for it yet.

HaAnhHung commented 2 years ago

https://github.com/caiobraga/background_locator

No problems. Thank u so much

NaeemUllah121 commented 1 year ago

I have implemented this library but unfortunately it is not working status is always like 'Is not Working'. Can somebody help me please?