我的包名为com.mywebsite.banana.
我这样叫猴子:
adb shell monkey -s 13 -p com.mywebsite.banana -v 500
Run Code Online (Sandbox Code Playgroud)
我的输出:
:Monkey: seed=13 count=500
:IncludeCategory: android.intent.category.LAUNCHER
:IncludeCategory: android.intent.category.MONKEY
No activities found to run, monkey aborted
Run Code Online (Sandbox Code Playgroud)
我的AndroidManifest.xml中有这个:
<categoy android:name="android.intent.category.LAUNCHER"/>
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?在运行猴子之前,我需要在应用程序中添加一些内容吗?主要活动位于com.mywebsite.banana中 - 是传递的正确路径,还是应该一直到这样的活动:com.mywebsite.banana.activityName?
从我所读到的,似乎我正确地做到了这一点:
编辑
尝试1:
adb shell monkey -p com.mywebsite.banana -c intent.CATEGORY_LAUNCHER -v 500
Run Code Online (Sandbox Code Playgroud)
结果1:
:Monkey: seed=13 count=500
:AllowPackage: com.mywebsite.banana
:IncludeCategory: intent.CATEGORY_LAUNCHER
// Warning: no activities found for category intent.CATEGORY_LAUNCHER
** No activities found to run, monkey aborted
Run Code Online (Sandbox Code Playgroud)
尝试2:
adb …Run Code Online (Sandbox Code Playgroud)