Build --> Clean Project 可以清理出很大一部分的空间
手动删除以下文件或者目录
Dir : ProjectFolder/build
Dir : ProjectFolder/app/build
Dir : ProjectFolder/app/release
Dir : ProjectFolder/.gradle
Dir : ProjectFolder/.idea
Dir : ProjectFolder/captures
File : ProjectFolder/*.iml
File : ProjectFolder/local.properties
File : ProjectFolder/.DS_Store
File : ProjectFolder/.externalNativeBuild
然后就可以打包了
附上.gitignore文件配置
/build
/app/build
/app/release
/captures
/.idea
/local.properties
*.iml
.gradle
.DS_Store
.externalNativeBuild