Android Studio报错:Could not GET 'https://dl.google.com******/gradle-3.1.2.pom
16lz
2021-01-23
Android Studio报错
Could not GET
‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom’.
Received status code 400 from server: Bad Request
头炸,弄了好半天,后来终于找到了解决办法,如下:
打开 C:\Users\j.gradle\gradle.properties 文件
## For more details on how to configure your build environment visit# http://www.gradle.org/docs/current/userguide/build_environment.html## Specifies the JVM arguments used for the daemon process.# The setting is particularly useful for tweaking memory settings.# Default value: -Xmx1024m -XX:MaxPermSize=256m# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8## When configured, Gradle will run in incubating parallel mode.# This option should only be used with decoupled projects. More details, visit# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects# org.gradle.parallel=true#Mon Jun 10 17:13:56 CST 2019systemProp.https.proxyPort=80systemProp.http.proxyHost=mirrors.neusoft.edu.cnsystemProp.https.proxyHost=mirrors.neusoft.edu.cnsystemProp.http.proxyPort=80
将后面四行注释
## For more details on how to configure your build environment visit# http://www.gradle.org/docs/current/userguide/build_environment.html## Specifies the JVM arguments used for the daemon process.# The setting is particularly useful for tweaking memory settings.# Default value: -Xmx1024m -XX:MaxPermSize=256m# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8## When configured, Gradle will run in incubating parallel mode.# This option should only be used with decoupled projects. More details, visit# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects# org.gradle.parallel=true#Mon Jun 10 17:13:56 CST 2019#systemProp.https.proxyPort=80#systemProp.http.proxyHost=mirrors.neusoft.edu.cn#systemProp.https.proxyHost=mirrors.neusoft.edu.cn#systemProp.http.proxyPort=80
问题解决
另:
如果还出现以下报错的:
ERROR: The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.
可以参考以下文章:
Android Studio报错:the minSdk version should not be declared in the android manifest file 解决办法
更多相关文章
- Android Studio(九):引用jar及so文件
- Android——4.2.2 文件系统文件夹分析
- [置顶] Android上传文件到Web服务器,PHP接收文件(二)
- Android国际化资源 文件夹命名规范
- Android安装apk文件并适配Android 7.0详解
- Android 列表数据写入到本地Excel文件(包括图片)
- linux 配置安装android sdk自动下载缺少文件
- Android在MTP模式下,只显示指定文件夹