写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. 快读代码level.2

    long long read() { long long ans=0; char last=' ',ch=getchar();//last用来存正负号,并消去那些换行符,空格 ') { last=ch ...

  2. oracle表的列合并(group by)和行合并(union all)

    group by select a.dn,t.dn dnt,a.BEGIN_TIME,a.R032_001,t.R032_001,a.R032_002,a.R032_003,a.R032_004, a ...

  3. beanFactory & FactoryBean区别

    FactoryBean Spring内部实现的一种规范& 开头作为beanName Spring中所有的容器都是FactoryBean 因为容器本身也由容器管理, root来创建 都是单列在I ...

  4. Python 面向对象Ⅲ

    Python内置类属性 __dict__ : 类的属性(包含一个字典,由类的数据属性组成) __doc__ :类的文档字符串 __name__: 类名 __module__: 类定义所在的模块http ...

  5. Dubbo搭建HelloWorld-搭建服务提供者与服务消费者并完成远程调用(附代码下载)

    场景 Dubbo简介与基本概念: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/103555224 Dubbo环境搭建-ZooKe ...

  6. 16.html转pdf的一个小示例

    def get_html(request): data = {"name": "alex", "age": 12, "sex&qu ...

  7. VS2015安装QT插件

    下载安装完后直接重新启动vs

  8. tp5商城

    记录几个要点: 用户使用firbug伪造表单字段,比如伪造表单id字段,如何防止,tp5中好像没有. xss攻击:使用htmlspecialchars() 会把img.p.等等合法标签过滤掉,想要有选 ...

  9. gulp[13124]: c:\ws\src\node_contextify.cc:626: Assertion `args[1]->IsString()' failed

    在执行gulp sass时报下面错误,又或者执行ionic serve时报这个错,选择低一点版本的node,建议8v; gulp[13124]: c:\ws\src\node_contextify.c ...

  10. C++入门经典-例6.13-指针与二维数组

    1:代码如下: // 6.13.cpp : 定义控制台应用程序的入口点. // #include"stdafx.h" #include<iostream> using ...