CULEBRA:空设备

2024-09-28 21:52:00 发布

您现在位置:Python中文网/ 问答频道 /正文

我想用Culebra和ADB创建一个AVD,但我认为这不是正确的方法,也许我需要使用SKD Android。你知道吗

操作系统:Windows 10

亚行正在运行:

netstat -an | findstr 5037
  TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING

跑步的库莱布拉:

AndroidViewClient主工具>;python culebra-G

Empty device list, will wait 60 secs for devices to appear
........TIMEOUT HANDLER 3
Exception in thread Thread-4:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 1073, in run
    self.function(*self.args, **self.kwargs)
  File "C:\Python27\lib\site-packages\androidviewclient-15.1.2-py2.7.egg\com\dtmilano\android\adb\adbclient.py", line 203, in timeoutHandler
    raise Timer.TimeoutException("Timer %d has expired" % timerId)
TimeoutException: Timer 3 has expired

Culebra和ADB是否足以产生AVD?你知道吗


Tags: runinpyselfliblinefilehas
1条回答
网友
1楼 · 发布于 2024-09-28 21:52:00

您必须先创建AVD或连接Android设备(即通过USB)。你知道吗

然后,运行adb验证它们是否已连接

demo: $ adb devices
List of devices attached
emulator-5554   device

当它们在线时,就像前面的示例中emulator-5554在线时一样,现在可以运行culebra。如果您添加-V(verbose),您将看到实际连接的设备

demo: $ culebra -GV
Connecting to a device with serialno=.* with a timeout of 60 secs...
Connected to device with serialno=.*
Actual device serialno=emulator-5554

您将看到culebra窗口(看起来很像您的模拟器窗口)

enter image description here

像往常一样,生成python脚本

#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (C) 2013-2018  Diego Torres Milano
Created on 2018-04-12 by Culebra v15.1.2
                      __    __    __    __
                     /  \  /  \  /  \  /  \ 
____________________/  __\/  __\/  __\/  __\_____________________________
___________________/  /__/  /__/  /__/  /________________________________
                   | / \   / \   / \   / \   \___
                   |/   \_/   \_/   \_/   \    o \ 
                                           \_____/ <
@author: Diego Torres Milano
@author: Jennifer E. Swofford (ascii art snake)
"""
...

相关问题 更多 >