在执行在设备上执行搜索查询的 adb 命令期间,我遇到了 Google 协助的奇怪行为:
adb shell am start -a “android.search.action.GLOBAL_SEARCH” --es query \“football\”
结果是:
Activity not started, unable to resolve Intent { act="android.search.action.GLOBAL_SEARCH" ...
然后没有搜索项。
当设备上的“开发人员选项”关闭然后再打开时,此错误消失了。
我们在 Manifest 中注册了搜索提供程序,如下所示:
<provider android:name="com.ourcompany.cordova.plugins.search.SearchProvider" android:authorities="com.ourcompany.cordova.plugins.search" android:exported="true">
<path-permission android:pathPrefix="/search" android:readPermission="android.permission.GLOBAL_SEARCH"/>
</provider>
安卓 8.0.0,API 26,英伟达盾
任何想法为什么会发生此错误?