写case写好好哒,突然debug的时候就冒出这个错误:

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path.

检查了一圈,没有找到任何原因所在,突然想到刚刚下载了一个新版的platform-tools替换了该路径下(/Users/XXX/Library/Android/sdk/)原有的platform-tools文件夹,采取的是直接copy覆盖的方式……然后恢复到原来的文件夹依然还是报错不干活……使用 appium-doctor检查环境一切ok

后续再次检查了 ANDROID_HOME 及其他环境变量的配置,依然没错……

然后又检查了/Users/XXX/Library/Android/sdk/build-tools下只有一个API Level 27,后续又下载了Level28/26, 依旧failed……

解决方法:

1.重新用android studio更新了一遍sdk (因为当时配置环境的时候为了方便直接安装了android studio来获取一些东西)

2.然后把/Users/XXX/Library/Android/sdk/build-tools/27.0.3下的aapt.exe copy了一份到/Users/XXX/Library/Android/sdk/tools/下

然后就可以愉快的跑起来啦,当然,没搞懂为什么要这样操作一把……

猜想,会不会最近为了解决多个adb冲突,将adb指向airtest路径下,造成环境比较混乱……看来需要清理清理环境了……



Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path的更多相关文章

  1. 【已解决】mac上appium报错:“Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path”

    按照网上教程配置完appium环境后,真机跑自动化过程,遇到如下报错: appium报错如下: [ADB] Checking whether aapt is present [ADB] The AND ...

  2. Appium问题解决方案(7)- Could not find 'adb.exe' in PATH. Please set the ANDROID_HOME environment variable with the Android SDK root directory path

    背景:运行代码提示找不到ADB An unknown server-side error occurred while processing the command. Original error: ...

  3. mac android studio 出现 Error: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

      Error: SDK location not found. Define location with sdk.dir in the local.properties file or with a ...

  4. SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

    问题描述: 已经安装了android-sdk 和gradle环境,并配置了环境变量,如下所示: android环境 root@wangju-HP--G4:/home/wangju/Desktop/5i ...

  5. Eclipse导入Gradle时报错:SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable

    百度查到http://stackoverflow.com/questions/19794200/gradle-android-and-the-android-home-sdk-location 按照其 ...

  6. [Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually

    7down voteaccepted I don't think its necessary to add everything into path.Just add the JAVA_HOME , ...

  7. Cannot find `aapt.exe`. Please install the Android SDK Build-tools package

    Google has updated their SDK tools ("Android SDK Tools" Rev. 23) in a way that also requir ...

  8. 获取apk信息工具(android SDK的aapt工具)

    aapt命令是android SDK 中的一个工具,功能强大,比如在windows平台获取apk包的信息. 使用该工具准备条件,也即获取aapt.exe文件的方式(2选1即可): 安装android ...

  9. Process 'command '/Users/lidaqiang/Library/Android/sdk/build-tools/27.0.3/aapt'' finished with non-zero exit value 1

    Process 'command '/Users/lidaqiang/Library/Android/sdk/build-tools/27.0.3/aapt'' finished with non-z ...

随机推荐

  1. bash配置相关

    登录方式 登录方式分为两种方式:

  2. Kendo UI for jQuery使用教程:小部件DOM元素结构

    [Kendo UI for jQuery最新试用版下载] Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support ...

  3. mybatis 分页插件PageHelper的简单使用

    首先在pom.xml配置文件中增加相关的插件. 插件地址:https://github.com/pagehelper/Mybatis-PageHelper <dependency> < ...

  4. IDEA中方法的快捷键及自定义方法

    1. 字母组合联想到对应的方法 ·ps联想到public static方法和成员 ·输入psvm联想到主方法 ·输入psf联想到用public static final 等 · pc联想到clone和 ...

  5. mysqli在php7中的使用

    mysqli这个库还是比较繁杂的,这其中又分mysqli ,mysqli_stmt,mysqli_result......一堆类,特别乱 这里奉上thinkphp5.1中使用mysqli扩展的查询用法 ...

  6. webpack打包,同时将ES6转为ES5,初探

    webpack打包,同时将ES6转为ES5,第一次尝试搞了一下午才弄好,所有的问题均来自ES6转es5上面,可能天分不够把,但愿各大浏览器快点支持ES6吧!忽略nodejs安装. 第一,新建一个项目文 ...

  7. jQuery_插入操作

    jQuery的插入方法有很多,有内部插入,也有外部插入,每个插入方式里面还有很多种,本文一一介绍,注释在代码里,直接上代码: 代码: <!DOCTYPE html> <html> ...

  8. 分区间统计sql、删除重复数据

    删除重复数据 备份表 删除最早的评论

  9. Netflix的Ribbon主要负载均衡策略

    1.简单轮询负载均衡 2.加权响应时间负载均衡 3.随机负载均衡 4.区域感知轮询负载均衡

  10. 云服务器搭建anaconda pytorch torchvision

    (因为在普通用户上安装有些权限问题安装出错,所以我在root用户下相对容易安装,但是anaconda官网说可以直接在普通用户下安装,不过,在root下安装,其他用户也是能用的. 访问Anaconda官 ...