工作环境问题记录

导入已有的Android工程出现“Task ‘’ not found in root project ‘MyProject’.”

详情如下:

Error:FAILURE: Build failed with an exception.

* What went wrong:
Task '' not found in root project 'MyProject'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

解决:
关闭工程,把工程下.idea的文件夹全部删掉,然后重新导入(不是重新打开)该工程即可解决。