原文錯誤提示:
Error:(16, 0) Gradle DSL method not found: 'android()'
Possible causes:<ul><li>The project ‘XXXXXXX' may be using a version of Gradle that does not contain the method.
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
錯誤原因:
android studio 引進項目時,自動查找本機是否有項目設置的SDK版本,若發現沒有,我們會在project structure修改成自己的SDK。然而,修改后,AS會自動在項目下的build.gradle里添加上以下代碼:

解決辦法:
刪除以上圖片中紅框中的代碼,然后再執行build->Rebuild project,刪除完之后的代碼如下:
