我们在使用Android Studio的时候新建项目没什么问题的,但是当我们下载一份Github上的项目导入进去的时候却没法正常使用,其原因主要是gradle配置问题。而由于gradle这个玩意儿版本更新太快,Android Studio每个版本也不一样。比如2.3版本使用gradle的版本是3.3,而2.4版本使用的是3.4.1.那么这个时候会出现什么问题呢?当你使用Android Studio 2.4版本导入一个2.3版本的项目的话就会出现需要修改gradle的版本。有时候Android Studio比较智能会自己修改的,但是有时候就没那么幸运了,比如下面这个图:
Error:(1, 0) Gradle version 2.2 is required. Current version is 3.4.1.
Please fix the project's Gradle settings.
<a href="fixGradleVersionInWrapper">Fix Gradl