Android Studio and android.support.v4.app.Fragment: cannot resolve symbol

后端 未结 22 2713
眼角桃花
眼角桃花 2020-12-01 06:03

I am tryng out Android Studio instead of Eclipse. I install it and then start a completely new project and follow the wizard. I add no code of my own.

Then, I right-

相关标签:
22条回答
  • 2020-12-01 06:49

    Do sth. modification (just to gradle sync) over app level build.gradle and sync. Again, redo what you changed in build.gradle and sync. It should fix your problem.

    0 讨论(0)
  • 2020-12-01 06:51

    I encountered this issue and tried everything including File > Invalidate Caches but nothing worked. The reason this issue was happening for me was because I had external projects that were using a different AppCompat version to my main gradle file.

    After I updated all gradle files to be the same version the compile error went away.

    0 讨论(0)
  • 2020-12-01 06:53

    File -> "Invalidate caches/Restart" This worked for me.

    0 讨论(0)
  • 2020-12-01 06:54

    I'm using buck and it seems like by removing the /.idea/libraries in your project folder and sync gradle again works for me.

    0 讨论(0)
提交回复
热议问题