[英]Error while using flutter background_location package
I just imported the package background_location , and didn't use it.我只是导入了 package background_location ,并没有使用它。 Even though I get this error
即使我收到此错误
* 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
Tried changing kotlin version, changed minSdkVersion but no change.尝试更改 kotlin 版本,更改 minSdkVersion 但没有变化。
Here are a few things you can do:您可以执行以下操作:
ext.kotlin_version = '1.6.0'
ext.kotlin_version = '1.6.0'
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
This is where I got these solutions from, Flutter: Execution failed for task ':app:compileDebugKotlin' .这是我从Flutter: Execution failed for task ':app:compileDebugKotlin'获得这些解决方案的地方。
Update: Change your dependency in your pubspec.yaml to:更新:将 pubspec.yaml 中的依赖项更改为:
background_location:
git:
url: https://github.com/hilalbaig/background_location.git
ref: master
Here is the reference: https://github.com/Almoullim/background_location/issues/150#issuecomment-1132144094这里是参考: https://github.com/Almoullim/background_location/issues/150#issuecomment-1132144094
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.