> Could not create task ':flutter_plugin_android_lifecycle:testReleaseUnitTest'. > this and base files have different roots:

huangapple go评论86阅读模式
英文:

> Could not create task ':flutter_plugin_android_lifecycle:testReleaseUnitTest'. > this and base files have different roots:

问题

尽管我已从本地磁盘 D 中删除了 flutter_plugin_android_lifecycle,但仍然显示此错误 -> 无法确定任务 ':flutter_plugin_android_lifecycle:test' 的依赖关系。 > 无法创建任务 ':flutter_plugin_android_lifecycle:testReleaseUnitTest'。 > 此文件和基本文件具有不同的根目录:D:\book_store\build\flutter_plugin_android_lifecycle 和 C:\Users\dell\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_plugin_android_lifecycle-2.0.15\android。

我已尝试过

flutter clean

flutter pub get
在根目录中。

英文:

Even though I have deleted flutter_plugin_android_lifecycle from local disk d but still it is showing this error ->
Could not determine the dependencies of task ':flutter_plugin_android_lifecycle:test'.
> Could not create task ':flutter_plugin_android_lifecycle:testReleaseUnitTest'.
> this and base files have different roots: D:\book_store\build\flutter_plugin_android_lifecycle and C:\Users\dell\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_plugin_android_lifecycle-2.0.15\android.

I have tried

flutter clean

flutter pub get
in root directories

答案1

得分: 0

我认为你需要升级Gradle版本。

dependencies {
    classpath 'com.android.tools.build:gradle:8.0.2'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
英文:

I think you have to upgrade the Gradle version.

dependencies {
        classpath 'com.android.tools.build:gradle:8.0.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }

huangapple
  • 本文由 发表于 2023年5月28日 05:01:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76349022.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定