Search code examples
androidfluttergoogle-assistantapp-actions

Unable to create preview of the app actions used in the app in google assistant


I have added the shortcuts.xml in res/xml and also added the

<meta-data
   android:name="android.app.shortcuts"
   android:resource="@xml/shortcuts" />

in the AndroidManifest.xml and also uploaded the signed bundle file in the play console internal testing.

But I'm getting the below error while creating the preview using the google assistant app actions test tool in android studio

Google Assistant plugin v2.3.0
                Preview Creation Error
                
                Status Code: 400
                Message: Precondition check failed.
                
                - Please sign in to Play Console (https://play.google.com/apps/publish) and check if you have accepted the latest Terms of Service (ToS), and the Gmail/G-Suite account has the authorization to modify the app with package name 'uninitialized.application.id'.

Solution

  • The part of the error message that reads

    modify the app with package name 'uninitialized.application.id'
    

    seems particularly strange. There are a few things I would make sure about:

    • Make sure your app/build.gradle has the correct applicationId in the defaultConfig section and that you use this Id elsewhere.
    • Make sure that was the version that you uploaded.
    • Ensure that the account that you used for the play store is the same account that you're using to for the test tool.
    • This issue suggests that a default applicationId may have been assigned and set in the merged manifest, and that you can just rebuild the entire project once you have it correctly set in app/build.gradle