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 解决办法

更多相关文章

  1. Android Studio(九):引用jar及so文件
  2. Android——4.2.2 文件系统文件夹分析
  3. [置顶] Android上传文件到Web服务器,PHP接收文件(二)
  4. Android国际化资源 文件夹命名规范
  5. Android安装apk文件并适配Android 7.0详解
  6. Android 列表数据写入到本地Excel文件(包括图片)
  7. linux 配置安装android sdk自动下载缺少文件
  8. Android在MTP模式下,只显示指定文件夹

随机推荐

  1. android图片轮播+点击跳转广告页面
  2. 林志华_Android
  3. Android开发者指南(11) —— Optimizing
  4. 2011.06.29(2)——— android 完全退出
  5. EditText属性描述
  6. 【Android學習專題】實用參考:android权限
  7. 【Android】调用系统应用常用uri & inten
  8. Androd学习笔记——Android中Touch事件的
  9. 【转】How to port native (C/C++) libra
  10. 《Android 获取当前app的版本号和版本名