Appium 【已解决】appium 连接真机在 windows 上运行报错。

ben · February 08, 2014 · Last by 虾米米 replied at December 11, 2014 · 1688 hits

在真机上跑报错了,以前在模拟器上跑是成功的。。请赐教~~~手机也是连上了的

共收到 25 条回复 时间 点赞

运行时 异常啊? 好像是说找不到 bootstrap

To remove the adb error, try the following: add the path to the sdk folder to the PATH variable. You can do that by editing / creating the .bash_profile file and add the following : export PATH=${PATH} ANDROID_HOME=/sdk/

See https://github.com/appium/appium/tree/master/docs/cn

看看能不能解决。

ben #3 · February 08, 2014 Author

#1 楼 @lihuazhang 刚看了下在 lib\devices\android\bootstrap\src\io\appium\android\bootstrap 路径下是有 Bootstrap.java 这个文件的啊。。他是说 jar 包里面没么?

ben #4 · February 08, 2014 Author

#2 楼 @lihuazhang 我没有看到文档里面有说这个问题啊?建立 bash_profile 文件是什么意思?

#4 楼 @benlooking 那是 linux 的环境变量 你对应 windows 得变换下

ben #6 · February 08, 2014 Author

#5 楼 @lihuazhang 也就是说 windows 的环境变量么。那个设置过了的。现在是用模拟器是可以跑,真机不行。我在想是不是 4724 端口找不到的原因呢

你看你自己的提示就是说 找不到 bootstrap

ben #8 · February 08, 2014 Author

#7 楼 @lihuazhang 恩。。那请问解决办法是什么呢?

#8 楼 @benlooking 你手机什么系统? Android 2.2 ?

ben #10 · February 08, 2014 Author

#9 楼 @lihuazhang 4.2.2 的系统。

#10 楼 @benlooking 看看 你的机器里面 有没有 uiautomator

ben #13 · February 08, 2014 Author

#12 楼 @lihuazhang 请问要怎么看呢?adb shell??

ben #15 · February 08, 2014 Author

#14 楼 @lihuazhang
没有额。。

#15 楼 @benlooking 你有看到我的图片么? 我里面有 pwd,然后显示的是 /system/.framework/, uiautomator.jar 应该出现在这里面。

ben #17 · February 08, 2014 Author

#16 楼 @lihuazhang
额。不好意思,发现没有 uiautomator.odex 那个

#17 楼 @benlooking 没有 odex 应该无所谓,那就是说你有 uiautomator.jar 这个可以排除掉。 别的不知道啥原因了。。

#17 楼 @benlooking 感觉是你的 bootstrap.jar 没有打进去手机。

ben #20 · February 08, 2014 Author

#19 楼 @lihuazhang 我好像是没有这个 jar 包?

ben #21 · February 08, 2014 Author

#19 楼 @lihuazhang
这里面也有。

ben #22 · February 08, 2014 Author

#19 楼 @lihuazhang 解决问题了。。是因为 adb 权限不够。。。今天麻烦了哈,非常感谢。

23Floor has deleted
ben #24 · February 08, 2014 Author

#19 楼 @lihuazhang
你好,appium 运行的时候能够不重新加载 apk 么? 我现在想每次运行都是我手机里面的 apk。
而不是通过代码里面的那个重新加载。

File appDir = new File(classpathRoot, "../../../apps/meoa");
File app = new File(appDir, "OldMeoa_debug.apk");

你好,请问 adb 权限不够,这个怎么解决??

请问 adb 权限不够,这个怎么解决??

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up