3

我创建了以下脚本并将其保存为 lib 文件夹中的 (test.mr) 并从命令提示符 C:\Android_Stuff\android-sdk-windows\tools\lib\monkeyrunner test.mr 运行

@Importing monkeyrunner    
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice

@waiting for the device connection
device = MonkeyRunner.waitForConnection()

@Installing my app.
device.installPackage('C:/Android_Stuff/android-sdk-windows/tools/lib/purchase.apk')

@starting my demo page
device.startActivity(component='com.mobilemoneynetwork.purchase/.demo')

@selecting the Menu Button.
device.press('KEYCODE_MENU','DOWN_AND_UP')

我正进入(状态

Unable to access jarfile ..\framework\archquery.jar
SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
4

1 回答 1

2

在环境变量中设置 ANDROID_SWT 路径它应该是“你的路径”\Android\Sdk\tools\lib\x86_64

于 2017-06-05T13:43:18.903 回答