AS,githup常见问题汇总(持续加入中)
github 提交代码的时候:
1、fatal: unable to access ‘https://github.com/wenfujing/AnimationClean.git/’: Coul d not resolve host: github.com
图示:
解决办法:https://blog.csdn.net/qq_38415505/article/details/83687207
2、fatal: sha1 file ‘’ write error: Broken pipe
图示:
解决:git bash命令行输入:git config http.postBuffer 52428800,或者更大,由于git在上传资源的时候默认是4M.项目里面有很多不需要的文件可以忽略。。或者使用上面指令重新定义大小。然后重新提交
3、运行AS项目时候,出现
Execution failed for task ‘:app:processDebugResources’.
原因:重复导入依赖
解决:
android studio 命令行环境输入:gradlew assembleDebug --stacktrace
```go
Caused by: com.android.builder.multidex.D8MainDexList$MainDexListException:
com.android.tools.r8.errors.CompilationError:
Program type already present:
android.support.design.widget.CoordinatorLayout$SavedState
可以看出是重复导入:android.support.design.widget.CoordinatorLayout``
或者命令行输入:gradlew app:dependencies可以查看依赖树,进入项目根目录。
得到重复导入的库之后。可以在Builder.gradle剔除相应的库。
implementation('com.android.support:recyclerview-v7:26.1.0') {
exclude group : 'com.android.support'
}
4、git fatal: The remote end hung up unexpectedly 错误
可能是上传的文件太大导致的:
可以输入命令
git config http.postBuffer 524288000
或
git config --global http.postBuffer 524288000
如果还是不行
git config --global http.postBuffer 1048576000