File -> settings -> Directories -> Add Content Root 中添加你当前的工程目录。 转载于:https://www.cnblogs.com/luckyflower/p/6771249.html