icapps / flutter-background-location-tracker

Flutter background location tracker plugin. (Android / iOS)
MIT License
31 stars 37 forks source link

build failed with and exception #36

Closed jesussmile closed 2 years ago

jesussmile commented 2 years ago

Apologies for a newbie question, I just created a new project in flutter , added the dependencies and the example code provide and ran, It gives me the following errors. How do I solve this ?


Parameter format not correct -
e: C:\flutter_windows_2.5.3-stable\flutter\.pub-cache\hosted\pub.dartlang.org\background_location_tracker-1.2.0\android\src\main\kotlin\com\icapps\background_location_tracker\BackgroundLocationTrackerPlugin.kt: (114, 13): Class 'ProxyLifecycleProvider' is not abstract and does not implement abstract member public abstract fun onActivitySaveInstanceState(@NonNull p0: Activity, @NonNull p1: Bundle): Unit defined in android.app.Application.ActivityLifecycleCallbacks
e: C:\flutter_windows_2.5.3-stable\flutter\.pub-cache\hosted\pub.dartlang.org\background_location_tracker-1.2.0\android\src\main\kotlin\com\icapps\background_location_tracker\BackgroundLocationTrackerPlugin.kt: (157, 9): 'onActivitySaveInstanceState' overrides nothing
e: C:\flutter_windows_2.5.3-stable\flutter\.pub-cache\hosted\pub.dartlang.org\background_location_tracker-1.2.0\android\src\main\kotlin\com\icapps\background_location_tracker\utils\ActivityCounter.kt: (8, 1): Object 'ActivityCounter' is not abstract and does not implement abstract member public abstract fun onActivitySaveInstanceState(@NonNull p0: Activity, @NonNull p1: Bundle): Unit defined in android.app.Application.ActivityLifecycleCallbacks
e: C:\flutter_windows_2.5.3-stable\flutter\.pub-cache\hosted\pub.dartlang.org\background_location_tracker-1.2.0\android\src\main\kotlin\com\icapps\background_location_tracker\utils\ActivityCounter.kt: (35, 5): 'onActivitySaveInstanceState' overrides nothing

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':background_location_tracker:compileDebugKotlin'.
> 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 19s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
jasoncarnahan commented 2 years ago

I'm seeing the same thing.

rijazrasheed commented 2 years ago

I got the same issue, Any idea to resolve it?

jesussmile commented 2 years ago

I just moved on to a different plugin. I think its carp. Background location wrapper.

vanlooverenkoen commented 2 years ago

Sorry for the long wait, we have been busy. Today I am reviewing this full plugin and updating where needed.

What is the compile version, build tool version, kotlin version,... that you are using?

rijazrasheed commented 2 years ago

Hi @vanlooverenkoen ext.kotlin_version = '1.6.10' compileSdkVersion 31

vanlooverenkoen commented 2 years ago

Should be fixed in #40