应用程序操作:实现意图参数缺少实体集参考

问题描述 投票:0回答:0

我第一次为我的应用程序实现 Google Assistant 集成逻辑。该实现在 GA 中显示了一个带有一些应用内数据的小部件。当使用 Android Studio plugin 在本地进行测试时,一切正常。

这是我的 shortcuts.xml 文件:

<shortcuts xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <capability
        android:name="actions.intent.GET_THING">
        <app-widget
            android:identifier="GET_THING_1"
            android:targetClass="com.myapp.widget.MyWidget">
            <parameter
                android:name="thing.name"
                android:key="shortcutId"
                android:required="true"
                app:shortcutMatchRequired="true" />
            <extra android:name="hasTts" android:value="true"/>
        </app-widget>
    </capability>

</shortcuts>

但是在将应用程序提交到 Play 商店时,它被拒绝并收到以下回复:

经审核,您的应用因 action.xml 文件存在问题而被拒绝。如果您提交了更新,您的应用程序的先前版本仍可在 Google Play 上使用。

APK 版本的 Action.xml 文件中的问题

Fulfillment intent 参数 thing.name 缺少同名参数的实体集引用。

我真的不明白这个评论。它似乎指的是已弃用的actions.xml框架,其中使用了

<entity-set>
元素,但我根本不使用它。

我最好的猜测是我在我的能力中使用

app:shortcutMatchRequired="true"
但我的快捷方式是动态创建的,但这完全是牵强附会。

这里非常需要帮助。

android actions-on-google google-play-console google-assistant app-actions
© www.soinside.com 2019 - 2024. All rights reserved.