[唐胡璐]Android自动化- 测试环境搭建中遇到的问题

这里主要讲一下在配置过程当中遇到一个小问题,其余的步骤会略过。android

 

  1. 安装JDK,并设置环境变量windows

  2. 下载Android ADT, 解压后,文件夹显示以下:安全

     

    Download the ADT bundle for your environment and extract the zip file, two directories will be extracted, Eclipse and
    SDK. From the Eclipse directory double click the file "Eclipse", Eclipse will start with the Android SDK and Android ADT
    plug-in set up.app

  3. 配置Android环境变量,例如:工具

    ANDROID_HOME: C:\adt-bundle-windows-x86_64-20131030\sdk测试

    Path添加: %ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools网站

  4. 打开Eclipse,新建AVD《Window --> Android Virtual Device Manager》。当我新建AVD的时候,CPU/ABI的选项灰化不能选择,致使不能新建AVD。google

    提示:No system images installed for tis targetorm

  5. 步骤4的缘由主要是SDK中有东西没有下载安全致使的。打开Android SDK Manager进行下载blog

    可是在下载老是报错"Download interrupted""Nothing was installed",多是由于这些是国外网站的事,可能被屏蔽了,在网上查找的时候发现了一个解决方法,本人在Win7下测试可用:

    a、修改hosts文件(C:\Windows\System32\drivers\etc\hosts),在最后添加以下内容

    127.0.0.1 localhost

    203.208.46.146www.google.com

    74.125.113.121 developer.android.com

    203.208.46.146 dl.google.com

    203.208.46.146 dl-ssl.google.com

    b、把https的资源获取方式强制换成http协议获取(Android SDK Manager的Tool->Option选项中)

    Images下载安装成功后,就能够建立你本身的AVD了。

  6.  Launch新建的AVD,以下:

  7.  到这,基本的测试环境就算有了,就能够接着配置你所用的测试工具的Jar包就能够了,好比appium, robotium等

相关文章
相关标签/搜索