![](/img/trans.png)
[英]"App is running" notification is shown using background_location plugin
[英]Error while using flutter background_location package
我只是導入了 package background_location ,並沒有使用它。 即使我收到此錯誤
* What went wrong:
Execution failed for task ':background_location: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 43s
Exception: Gradle task assembleDebug failed with exit code 1
嘗試更改 kotlin 版本,更改 minSdkVersion 但沒有變化。
您可以執行以下操作:
ext.kotlin_version = '1.6.0'
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
這是我從Flutter: Execution failed for task ':app:compileDebugKotlin'獲得這些解決方案的地方。
更新:將 pubspec.yaml 中的依賴項更改為:
background_location:
git:
url: https://github.com/hilalbaig/background_location.git
ref: master
這里是參考: https://github.com/Almoullim/background_location/issues/150#issuecomment-1132144094
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.