1.去gradle官网下载gradle,gradle的版本可以在C:Program FilesAndroidAndroid Studiogradle下看到
2.新建一个项目,退出后把下载好的gradle-all zip包放进C:Users***.gradlewrapperdistsgradle-4.1-allzyivzo6n839fup2jbap0tjew
3.启动Android Studio,在Configurations里下载SDK,要下载26.6,不然会有gradle sync fail
4.新建项目后,编辑.gitignore文件,加入下面的配置
1 # Built application files 2 *.apk 3 *.ap_ 4 5 # Files for the Dalvik VM 6 *.dex 7 8 # Java class files 9 *.class 10 11 # Generated files 12 bin/ 13 gen/ 14 15 # Local configuration file (sdk path, etc) 16 local.properties 17 18 # OSX files 19 .DS_Store 20 21 # Android Studio 22 *.iml 23 .idea 24 25 # Gradle files 26 .gradle/ 27 build/ 28 29 # Local configuration file (sdk path, etc) 30 local.properties 31 32 # Proguard folder generated by Eclipse 33 proguard/ 34 35 # Log Files 36 *.log