You may need to adjust the proxy settings in Gradle.
2016-11-02 19:04
651 查看
1.情况
本人碰到这种情况是使用Rxjava和Rxandroid发生的,这两个包总是依赖报这个错,如图,然后我百度各种资料如点击打开链接,但是好像然并卵,其中第二种方法在以前的版本好像可以,因为以前的android-studio版本在安装时确实会生成.gradle这个文件夹,但是我使用2.2的AS,安装目录如下,并且在ASgradle设置里面也并没有牵涉到.gradle文件夹,所以我各种尝试,好像解决这个问题,注意
是好像。
2.解决
注意自己新建的项目中,这两个gradle版本应该要一致,所以就知道自己gradle的版本了,比如我的项目中gradle.gradle中版本为2.14.1,gradle文件夹中找到gradle-wrapper.properties文件打开为gradle-2.14.1-a
ll.zip
所以我的gradle为2.14.1,然后在点击打开链接,下载到相关的gradle版本,直接解压copy到AS的安装目录中gradle文件夹中,如图
,其中gradle-2.14.1-all文件夹中的内容如图
然后将AS退出去,等3分钟左右,注意我退出马上又进去,sync后还是报错,但是我等段时间就没问题。但是我这样做解决了我的问题,希望能帮你们!
相关文章推荐
- Error:Unknown host 'services.gradle.org'. You may need to adjust the proxy settings in Gradle. Error
- AndroidStudio报错unknow host"akamai.bintray.com".you may need to adjust the proxy settings in gradle
- Unknown host 'android.oa.com'. You may need to adjust the proxy settings in Gradle.
- Unknown host 'android.oa.com'. You may need to adjust the proxy settings in Gradle.
- Error:Unknown host 'services.gradle.org'. You may need to adjust the proxy settings in Gradle. Error
- [Android]Error:Unknown host 'maven.oa.com'. You may need to adjust the proxy settings in Gradle.
- Error:Unknown host 'android.oa.com'. You may need to adjust the proxy settings in Gradle.
- Error: unknown host ‘android.oa.com'.You may need to adjust the proxy setting in Gradle.
- Androidstudio无法下载报错unknow host"akamai.bintray.com".you may need to adjust the proxy settings in grad
- unknow host service.gradle.org, you may need adjust the proxy settings in gradle
- Error: unknown host ‘android.oa.com'.You may need to adjust the proxy setting in Gradle.
- If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.(AS报错)
- 【Android Studio错误】 If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
- If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
- The target assembly contains no service types. You may need to adjust the Code Access Security policy of this assembly." 目标程序集不包含服务类型。可能需要调整此程序集的代码访问安全策略。
- You need tcl 8.5 or newer in order to run the Redis test
- You need tcl 8.5 or newer in order to run the Redis test
- Ubuntu 14.04下Redis安装报错:“You need tcl 8.5 or newer in order to run the Redis test”问题解决
- You may need to configure your browser or application to trust the Charles Root Certificate.
- You need tcl 8.5 or newer in order to run the Redis test