[英]Why [App Actions Test Tool] not support shortcuts xml file?
我使用 Android Shortcuts 框架創建了 App Actions: https : //developers.google.com/assistant/app/get-started
快捷方式.xml
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<capability android:name="custom.actions.intent.PLUS_DAYS"
queryPatterns="@array/PlusQueries">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.noen.maihue.datetimeplus"
android:targetClass="com.noen.maihue.datetimeplus.MainActivity">
<parameter
android:name="day_number"
android:key="day_number"/>
</intent>
</capability>
<shortcut
android:shortcutId="Plus_Days"
android:shortcutShortLabel="@string/PlusDayShort">
<capability-binding android:key="custom.actions.intent.PLUS_DAYS">
<parameter-binding
android:key="day_number"
android:value="@string/day_number"/>
</capability-binding>
</shortcut>
<!-- Specify more shortcuts here. -->
</shortcuts>
Androidmanifest.xml
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
但是如果我創建一個預覽來測試,它會發生錯誤:
App Actions Test Tool v3.5.5
No Android Module with actions file reference found. You need one Android Module with an actions file reference.
Create Actions.xml
為什么 App Actions 測試工具不支持快捷方式 xml 文件?
您需要安裝另一個 Android Studio 插件“Google Assistant”,該插件還包含一個“應用操作測試工具”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.