gpt4 book ai didi

flutter - 无法访问 'android.arch.lifecycle.LifecycleOwner',它是 'com.ex.app.MainActivity' 的父类(super class)型

转载 作者:行者123 更新时间:2023-12-01 22:40:33 25 4
gpt4 key购买 nike

我在android studio中创建了一个新的flutter项目,然后“打开项目”它的android部分,我遇到了 MainActivity.kt 中出现错误,但构建成功。

enter image description here

我的类(class)路径是:

enter image description here

最后我的依赖项是:

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

如果有人能帮助我,我将不胜感激。

最佳答案

我面临同样的问题,现在它在我的案例中解决了

第 1 步:在 AndroidStudio 中打开您的项目
第 2 步:打开终端并转到终端中的项目路径
第 3 步:点击此命令“git clean -xfd
第 3 步:转到:文件 -> 使缓存无效/重新启动

关于flutter - 无法访问 'android.arch.lifecycle.LifecycleOwner',它是 'com.ex.app.MainActivity' 的父类(super class)型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60648967/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com