AndroidStudio : Cannot resolve symbol MainActivity

后端 未结 7 1877
说谎
说谎 2021-01-17 13:07

I got an error \"Cannot resolve symbol MainActivity\" on this code.



        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-17 13:25

    It's possible that your 'src' directory isn't set as a source directory?

    Your IDE seems to be seeing your com.example.fovoapp as a simple directory structure instead of a package. Also looking at your linked image, the little "J" on the java files tells me that also. When a java file is set as source usually it shows up as a Class "C".

    I could be wrong but make sure you set your src directory as source and that should fix the issue.

提交回复
热议问题