android 模拟器 2.3.3 - 无法通过 adb 启动联系人应用程序

标签 android adb activity-manager

正在做 adb shell am start -a android.intent.action.start -t vnd.android.cursor.dir/contact 导致:

Starting: Intent { act=android.intent.action.start typ=vnd.android.cursor.dir/contact }
Error: Activity not started, unable to resolve Intent { act=android.intent.action.start typ=vnd.android.cursor.dir/contact flg=0x10000000 }

请指教。

最佳答案

有意向选项。应用程序正在使用 Intent 过滤器。您可以使用 Intent 过滤器或直接使用名称启动该应用。

adb shell am start -n  vnd.android.cursor.dir/contact

包名称应为 vnd.android.cursor.dir,目标 Activity 应为 contact。

-n 指定带有包名称前缀的组件名称以创建显式 Intent ,例如“com.example.app/.ExampleActivity”。

请查看此链接了解更多详情:http://developer.android.com/tools/help/adb.html#IntentSpec

关于android 模拟器 2.3.3 - 无法通过 adb 启动联系人应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14436021/

相关文章:

android - 设备屏幕休眠时测试失败

android - native 调试 Android Studio

android - 如何以编程方式从另一个应用程序中杀死像应用程序这样的聊天头?

Android studio 制作带依赖的jar文件

java - 同时对 vector 绘图的许多部分进行动画处理

android - 断开 USB 后,ADB over WiFi 连接丢失

android - 如何确定在 android 中以编程方式运行应用程序的权限?

java - 命名正在运行的应用程序而不是包名称

java - 如何模拟未在模块中声明的注入(inject)对象?

javascript - 如何在 webview 中调用或模仿 javascript 函数