zoukankan      html  css  js  c++  java
  • Android Stdio部分配置

    一、Error:Cause: unable to find valid certification path to requested target
    主要是在根目录的build.gradle下配置的jcenter的地址:
    buildscript {
      repositories {
      google()
      jcenter{
        url 'http://jcenter.bintray.com'
        }
      }
      dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
        }
      }
      allprojects {
        repositories {
        google()
        jcenter{
          url 'http://jcenter.bintray.com'
        }
      }
    }
    Android studio3.1在连接'http://jcenter.bintray.com'时没有证书,报错:Error:Cause: unable to find valid certification path to requested target,一般的操作方法是在jdk里面添加证书,如下:
    https://blog.csdn.net/frankcheng5143/article/details/52164939
    注意,是在Android Studio使用的jdk的目录下,可以通过 File->Other Settings->Default Project Structure来查看。

    在Android Studio3.1版本中,已经将cacerts集成在用户的配置目录下,比如我的:C:Usersfeng.AndroidStudio3.1system asks下,可以按照上述方法进行cacerts添加。

    还有一个讨巧的方法,出现Error:Cause: unable to find valid certification path to requested target的错误时,一般会给出一个网址,比如我的:http://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom,表示下载这个组件时超时。先去浏览器中看一下,这个URL是否确实可以访问到。再到Android Studio3.1的setting中搜索"Http",打开Http配置,下面有一个Check connection,点击它,将报错的网址输进去测试链接。如果连接成功,AS会跳出权限添加,这样就不用主动添加权限了。刷新,重编译。

      没有英汉互译结果
      请尝试网页搜索
  • 相关阅读:
    【洛谷P6835】线形生物
    【洛谷P2679】子串
    【洛谷P5072】盼君勿忘
    【洛谷P3312】数表
    【洛谷P1447】能量采集
    【洛谷P2257】YY的GCD
    【洛谷P4318】完全平方数
    【AT2300】Snuke Line
    window.showModalDialog
    js typeof
  • 原文地址:https://www.cnblogs.com/AndersonX/p/8707451.html
Copyright © 2011-2022 走看看