无法访问"android.arch.lifecycle.LifecycleOwner",它是"com.ex.app.MainActivity"的超类型 [英] Cannot access 'android.arch.lifecycle.LifecycleOwner' which is a supertype of 'com.ex.app.MainActivity'
本文介绍了无法访问"android.arch.lifecycle.LifecycleOwner",它是"com.ex.app.MainActivity"的超类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在android studio中创建了一个新的flutter项目,然后打开项目"它的android部分,我遇到了MainActivity.kt中的一个错误,但是它构建成功.
I create a new flutter project in android studio then "open project" the android part of it, I met an error in MainActivity.kt however it builds successfully.
我的上课路径是:
最后我的依赖项是:
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'
如果有人能帮助我,我将不胜感激.
I would be grateful if someone could help me.
推荐答案
我遇到了同样的问题,现在我可以解决
第1步:在AndroidStudio中打开您的项目
第2步:打开终端并在终端
中转到您的项目路径步骤3:点击此命令' git clean -xfd '
步骤3:转到:文件->使缓存无效/重新启动
I face same Problem, now it solved in my case
Step 1 : open your project in AndroidStudio
Step 2 : open Terminal and goto your project path in terminal
Step 3 : Hit this command 'git clean -xfd'
Step 3 : Goto : File -> Invalidate caches/restart
这篇关于无法访问"android.arch.lifecycle.LifecycleOwner",它是"com.ex.app.MainActivity"的超类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文