简体   繁体   English

为什么[App Actions Test Tool]不支持快捷方式xml文件?

[英]Why [App Actions Test Tool] not support shortcuts xml file?

I had created App Actions using the Android Shortcuts framework: https://developers.google.com/assistant/app/get-started我使用 Android Shortcuts 框架创建了 App Actions: https : //developers.google.com/assistant/app/get-started

shortcuts.xml快捷方式.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 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>

But if I create a Preview to test, it occur error:但是如果我创建一个预览来测试,它会发生错误:

    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

Why App Actions Test Tool not support shortcuts xml file?为什么 App Actions 测试工具不支持快捷方式 xml 文件?

您需要安装另一个 Android Studio 插件“Google Assistant”,该插件还包含一个“应用操作测试工具”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 应用操作未与应用操作测试工具一起运行 - App Action not running with App Actions Test Tool 应用程序操作:使用测试工具但不使用语音 - app actions: work with test tool but not with voice 为什么我的应用可以与应用操作测试工具一起使用,但在 Play 商店发布时却不行? - Why does my app work with app actions test tool, but not when it's published on the play store? 有没有办法在不使用测试工具的情况下测试 android 应用程序操作 - Is there a way to test android app actions without using the test tool App Action 适用于 App Actions 测试工具,但不适用于 Google Assistant - App Action Works on App Actions Test Tool But not On Google Assistant 在 Android 上,我无法让 actions.intent.OPEN_APP_FEATURE 在应用程序操作测试工具之外工作 - On Android, I cannot get actions.intent.OPEN_APP_FEATURE to work outside the App Actions Test Tool 如何定义应用程序中特定操作的快捷方式? - how can define shortcuts to specific actions in the app? Android XML文件-如何添加对设计工具的支持 - Android XML file - how to add support for the design tool OPEN_APP_FEATURE 操作无法通过语音命令运行 [通过应用程序操作测试工具完美运行] - OPEN_APP_FEATURE action not working through voice command [Works perfactly via App Actions Test Tool] 带有谷歌助手的 App Actions 测试工具显示“对不起,我找不到它” - App Actions test tool with google assistant shows "Sorry, I couldn't find it"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM