V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
michaelye1988
V2EX  ›  问与答

Android Studio 环境搭建问题

  •  
  •   michaelye1988 · Nov 6, 2014 · 19755 views
    This topic created in 4194 days ago, the information mentioned may be changed or developed.
    应该是被墙了,在新建项目的过程中提示:

    Loading SDK information...
    Refresh Sources:
    Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com>; OR <www.google.com>;
    Fetched Add-ons List successfully
    Refresh Sources
    Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-10.xml, reason: SSL hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com>; OR <www.google.com>;
    Refresh Sources:
    Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-10.xml, reason: SSL hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com>; OR <www.google.com>;
    There is nothing to install or update.


    搜索了一下很多人有这个问题,但是目前搜索到的解决方案都不行。
    Supplement 1  ·  Nov 6, 2014
    工程是能顺利新建的,但是不能编译,也不能运行,提示failed to sync Gradle project'xxx' failed to find build Tools revision 19.1.0

    但是sdk里面以及下载好了19.1.0
    Supplement 2  ·  Nov 6, 2014
    解决了,求人不如求己。
    解决方法:Android Studio下载的地方显示包含了sdk,但是下载后却没有看到sdk在哪里。打开的时候需要关联一个sdk,这时候问题来了。我关联的是旧版本的sdk,这个时候,到官网下载eclipse的开发环境,里面有sdk,关联该sdk,就可以正常使用了。
    6 replies    2014-11-17 12:48:48 +08:00
    marvinlix
        1
    marvinlix  
       Nov 6, 2014
    要翻墙下载sdk
    bubbles
        2
    bubbles  
       Nov 6, 2014
    其实用http代理就可以,找一个速度可以的还是很快的。
    Culm
        3
    Culm  
       Nov 6, 2014
    每次看到楼主这类头像,我就不想承认我做过android
    michaelye1988
        4
    michaelye1988  
    OP
       Nov 6, 2014
    @marvinlix
    @bubbles 是这样的,我在本地已经有sdk了(Eclipse在用的),然后今天下载Android Studio,里面指定了sdk的目录,和Eclipse共用一个sdk,但是,这几个文件一直无法下载下来,通过sdk Manager下载sdk是没有问题的。可是在新建工程的时候老是会提示这个。不知道这什么意思。
    332781100
        5
    332781100  
       Nov 16, 2014   ❤️ 1
    我用了vpn都不行,奇怪的是,我用浏览器访问那个Failed to fetch URL,可以访问到。然后我在看看错误信息。reason: hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com>; OR <www.google.com>。证书中的hostname不匹配。然后猜想,以前用eclipse的时候sdk update修改了windows下面的host文件,把host下的
    203.208.46.146 dl.google.com
    203.208.46.146 dl-ssl.google.com
    注释掉,然后打开vpn更新,可以了。
    btw:android studio编程真的很有快感,不过同时bug也挺多的
    michaelye1988
        6
    michaelye1988  
    OP
       Nov 17, 2014
    @332781100 恩,是这样的,Eclipse也留着,以备不时之需,哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2112 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 00:33 · PVG 08:33 · LAX 17:33 · JFK 20:33
    ♥ Do have faith in what you're doing.