[2015-08-10 15:09:07 - androidtest1] Performing android.test.InstrumentationTestRunner JUnit launch
[2015-08-10 15:09:07 - androidtest1] Automatic Target Mode: using device '192.168.56.101:5555'
[2015-08-10 15:09:07 - androidtest1] Uploading androidtest1.apk onto device '192.168.56.101:5555'
[2015-08-10 15:09:07 - androidtest1] Installing androidtest1.apk...
[2015-08-10 15:09:08 - androidtest1] Success!
[2015-08-10 15:09:08 - androidtest1] Project dependency found, installing: myandroid1
[2015-08-10 15:09:08 - myandroid1] Uploading myandroid1.apk onto device '192.168.56.101:5555'
[2015-08-10 15:09:08 - myandroid1] Installing myandroid1.apk...
[2015-08-10 15:09:09 - myandroid1] Success!
[2015-08-10 15:09:09 - androidtest1] Launching instrumentation android.test.InstrumentationTestRunner on 192.168.56.101:5555
[2015-08-10 15:09:09 - androidtest1] Failed to launch test

在用appium测试android时,建了一个android test project,运行时就出现这个错了,重新建一个java project,吧之前的工程移过来,就不会有这个错了。(猜想android test project是测试android源码的)

虽然这个问题是解决了,但是在新建的java project上run as junit test时,出现错误:

Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:637)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

这个错误比较奇怪,我同一个工程,如果放在c盘,执行时不会有这个错,然而我放到我的项目盘,如E盘,执行时就有这个错了。(我已经吧eclispe 的java编译器,java安装版都选为和机器上安装的一致了)。

如是直接弃用E盘的工程了,但是执行时新的错误来了:

java.lang.NoSuchFieldError: org/apache/http/conn/ssl/AllowAllHostnameVerifier.INSTANCE

其实错误很长,大体意思是httpclient连接出问题了。检查时发现我加载了jre的包,同时也加载了android sdk的包,如是删掉了android sdk的包,重新运行,什么错都没有了。

问题算是解决了,但解决问题的过程很艰辛,大概断断续续的花了2天左右时间,期间google,baidu了N多文章,有类似的问题,但仅能作为参考。真正要解决问题,还是得根据错误的实际情况去分析解决啊。

Failed to lunch test error when run with Appium (已解决)的更多相关文章

  1. Thrift报错:Error: Thrift compiler: Failed to translate files. Error: Cannot run program thrift error=2

    文章目录 报错: 原因: 解决: 报错: Error: Thrift compiler: Failed to translate files. Error: Cannot run program th ...

  2. Android错误:can not get file data of lua/start_v2.op [LUA ERROR] [string "require "lua/start_v2””] 已解决

    错误: can not get file data of lua/start_v2.op [LUA ERROR] [string "require "lua/start_v2””] ...

  3. Deployment failed due to an error in FastDev assembly synchronization.

    在编译的时候发生Assembly synchronization error,显示信息为:Deployment failed due to an error in FastDev assembly s ...

  4. java: Compilation failed: internal java compiler error

    IDEA 编译项目出现java: Compilation failed: internal java compiler error 原因:  项目Java版本不一致 解决办法:  点击FIle> ...

  5. running boot2docker -> error in run: Failed to get machine “boot2docker-vm”: machine does not exist

    登陆和使用.详细请看.....https://github.com/boot2docker/boot2docker boot2docker start error in run: Failed to ...

  6. nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)

    当你执行sudo nginx -s reload时出现nginx: [error] open() "/run/nginx.pid" failed (2: No such file ...

  7. error: failed to connect to the hypervisor error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory 解决办法

    服务器版本:CentOS Linux release 7.4 Linux lb 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x8 ...

  8. Nginx pid文件找不到 nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)

    Nginx pid文件找不到 nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or dir ...

  9. cvsnt报错:Administrator: Switch to user failed due to configuration error. Contact your System Administrator

    在安装CVSNT一开始用Administrator登录时总是报[login aborted]Switch to user failed due to configuration error. Cont ...

随机推荐

  1. iOS开发(1) WebView和HTML 显示

    iOS 7 已经release了.现在学习iOS开发还是非常热门的.到处也有些团队在寻找iOS开发的人才. 那么,iOS开发.....省略了1万字.... HTML5 +CSS3+JS...再省略1万 ...

  2. 然爸读书笔记(2014-10)----Bootsrap用户手册

    本来其实这方面的知识,可以直接在网站上看,但是自己是web前端的小白.基本不懂.所以,还是买一本书来看,更好些.体现出我对前端的重视. Bootstrap是快速开发Web应用程序的前端工具包.它是一个 ...

  3. hibernate添加数据,默认字段为null的问题解决

    数据库中的一个字段默认为0,但是在用hibernate的添加之后,默认字段竟然不是0,为NULL. 查了一下.发现想要让默认字段生效.需要在*.hbm.xml添加一些参数,如下.(红色部分) dyna ...

  4. C#学习笔记(三)

    1.我们在Main()函数中,调用Test()函数,我们管Main()函数称之为调用者,管Test()函数称之为被调用者.如果被调用者想要得到调用者的值:1).传递参数.2).使用静态字段来模拟全局变 ...

  5. [scalability] Find all documents that contain a list of words

    Given a list of millions of documents, how would you find all documents that contain a list of words ...

  6. onClick(View) of type new View.OnClickListener(){} must override a superclass method

    原地址:http://blog.csdn.net/aeolus1019/article/details/8014798 Android开发过程中代码错误报错如下: - implements andro ...

  7. android 点击重新加载界面设计

    在项目中经常会遇到这样的场合,用户点击了一个界面后要提示等待加载,最后有可能显示加载失败,点击屏幕再重试加载.下面是该实例的代码: layout: loading.xml <?xml versi ...

  8. hbase 使用备忘

    hbase是基于hadoop的,所以hbase服务器必须启动hadoop,这点很重要. 当然hbase其实只用到了dadoop的一个组件 1. 启动hadoop-dfs 在主上执行如下命令,可以把主和 ...

  9. Spring在代码中获取bean的几种方式

    方法一:在初始化时保存ApplicationContext对象 方法二:通过Spring提供的utils类获取ApplicationContext对象 方法三:继承自抽象类ApplicationObj ...

  10. Source Insight的应用技巧、宏功能

    目录 1 简介... 5 2 搭建我们的SI环境... 5 2.1 搭建步骤... 5 2.2 说明... 6 3 应用技巧... 6 3.1 初级应用技巧... 6 3.1.1 解决字体不等宽与对齐 ...