Android Studio suddenly cannot resolve symbols

后端 未结 28 2891
南笙
南笙 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 05:13

    Please check if you have a project path which has special characters like ! (exclamation mark).

    In a similar problem that I experienced, this was the root cause - since many Java applications seem not to tolerate such special characters (For e.g. doing a 'gradlew clean' from the terminal would fail and throw a RunTimeException.). None of the other solutions posted online had helped me. But, once I had removed the ! from the path and did a clean build, Android Studio magically worked.

提交回复
热议问题