Android Studio suddenly cannot resolve symbols

后端 未结 28 2595
南笙
南笙 2020-11-22 04:42

Android Studio 0.4.2 was working fine and today I opened it and almost everything was red and the auto-completion had stopped working. I look at the imports and AS seems to

28条回答
  •  忘了有多久
    2020-11-22 04:55

    I'm using Android Studio 3.1.4 and I was experiencing such issue when moving from my develop branch with a lower api target to another branch with target api Oreo. I tried the first solution which worked but it is quite tricky, while the second solution did not solve the problem.

    My Solution When the problem popped back again I have tried to modify slightly my app gradle file enough to AS to ask me to sync files, and that did the trick. Then I deleted the change.

    I guess that "Sync Project with Gradle Files" might work as well but I haven't tried it myself

    Hope it helps

提交回复
热议问题