Android Instant App - Play 控制台发布/部署错误且 DAL(数字资产链接)未链接

2024-03-02

我试图弄清楚为什么游戏商店不接受我的即时应用程序构建。我已经成功部署了Alpha定期向测试人员发布应用程序,因为这是发布即时应用程序的先决条件。我正在尝试部署一个发展发布即时应用程序。我究竟做错了什么?我尝试添加尽可能多的细节。

我是否需要使用以下链接中的 Digital Asset Link API 服务来制作即时应用程序,还是用于其他用途?https://console.developers.google.com/apis/api/digitalassetlinks.googleapis.com/overview https://console.developers.google.com/apis/api/digitalassetlinks.googleapis.com/overview

将即时应用程序构建上传到播放控制台时出现以下错误:

您的网站“example.com”尚未通过数字链接 Assets Link 协议到您的应用程序。请通过以下链接链接您的网站 数字资产链接协议到您的应用程序。

One thing i'm a little confused about is why when I click link and verify that a get the error message "Adding asset statements failed." as shown in the following picture: Adding asset statements failed I notice that when I click the link and verify button, it modifies the strings.xml file in base and adds the following string: <string name="asset_statements" translatable="false">[{\n \"relation\": [\"delegate_permission/common.handle_all_urls\"],\n \"target\": {\n \"namespace\": \"web\",\n \"site\": \"https://example.com\",\n }\n}]</string>

我的清单中有以下内容base, 清单 and advisor在应用程序标签下:<meta-data android:name="asset_statements" android:resource="@string/asset_statements"/>

项目描述及结构:

应用描述:这是一个概念验证应用程序。可安装的应用程序将打开主要功能活动,其中有两个按钮,单击后将带您进入清单或顾问活动。有两个即时应用程序,instantapp-checklist 转到清单活动,instantapp(advisor) 转到顾问活动。

  • 有3个功能模块:mainfeature、checklist、advisor
  • 有 2 个即时应用程序:instantapp-checklist、instantapp(advisor)
  • 我的可安装应用程序的捆绑包是:blah.blah1.blah2.myappname
  • 我的清单即时应用程序的捆绑包 ID 是:blah.blah1.blah2.myappname.checklist
  • 我的顾问即时应用程序的捆绑 ID 是:blah.blah1.blah2.myappname.advisor

我的 assetlinks.json 是:

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "blah.blah1.blah2.myappname.checklist",
    "sha256_cert_fingerprints":
    ["AA:...:53"]
  }
},
{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "blah.blah1.blah2.myappname.advisor",
    "sha256_cert_fingerprints":
    ["AA:...:53"]
  }
}]

在我的清单清单中,活动标签内的内容如下:

        <meta-data
            android:name="default-url"
            android:value="https://example.com/checklist.html"/>

        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>

            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
        <intent-filter android:order="1"
                       android:autoVerify="true">
            <action android:name="android.intent.action.VIEW"/>

            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>

            <data
                android:scheme="http"
                android:host="example.com"
                android:pathPattern="/checklist.html"/>
            <data android:scheme="https"/>
        </intent-filter>

我所做的自我检查:

  • 即时应用程序是使用我的密钥库而不是调试密钥进行签名的。我检查以确保即时应用程序和 assetlinks.json 显示相同的 sha256 指纹。
  • robots.txt 允许所有机器人搜索 assetlinks.json
  • assetlinks.json 确实有有效的证书并允许 https
  • assetlinks.json 标头的内容类型是 application/json
  • 我没有选择加入“Google Play 应用签名”
  • 我使用以下网站来测试我的声明,并且它是成功的:https://developers.google.com/digital-asset-links/tools/generator https://developers.google.com/digital-asset-links/tools/generator

In the 资产链接.json文件、字段包裹名字被设定为blah.blah1.blah2.myappname.checklist.

然而,上面提到的是,可安装应用程序的 ID is blah.blah1.blah2.myappname。这意味着包裹名字 in the AndroidManifest.xml被设定为blah.blah1.blah2.myappname.

他们应该匹配。blah.blah1.blah2.myappname必须添加到资产链接.json在服务器上。

In the 字符串.xml,更改 asset_statements:

<string name="asset_statements" translatable="false">[{\n  \"relation\": [\"delegate_permission/common.handle_all_urls\"],\n  \"target\": {\n    \"namespace\": \"web\",\n    \"site\": \"https://qaapps.cio.ny.gov/apps/sandbox/james/hesc/checklist.html\",\n  }\n},{\n  \"relation\": [\"delegate_permission/common.handle_all_urls\"],\n  \"target\": {\n    \"namespace\": \"web\",\n    \"site\": \"https://qaapps.cio.ny.gov/apps/sandbox/james/hesc/advisor.html\",\n  }\n}]</string>

以下是帮助我找到解决方案的其他一些注释:

  • 我使用以下命令行来测试即时应用程序是否有效:adb shell am start -a android.intent.action.VIEW -d "https://example.com/checklist/"
  • 在设备上,我去了设置 > Google > 即时应用并单击开关以卸载/关闭即时应用程序,然后再次单击以将其重新打开。还转到 Chrome 设置(设置 > 隐私 > 清除浏览数据) 清除时间范围“所有时间”的所有数据。
  • 在 Chrome 中输入免安装应用程序的网址时,它只会打开网站,而不会打开免安装应用程序。如果我单击网站中即时应用程序的链接,它会打开即时应用程序而不是网站。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android Instant App - Play 控制台发布/部署错误且 DAL(数字资产链接)未链接 的相关文章

随机推荐

  • 使用shell脚本删除文件夹内容

    我在尝试清空脚本中的文件夹时遇到问题 这在我的命令行中工作 rm r Folder1 Folder2 但如果在我的脚本中我这样做 DIR Folder1 Folder2 rm r DIR 它说 rm Folder1 Folder2 没有这样
  • Makefile:多重定义和未定义的引用错误

    我目前正在学习如何在没有 IDE 的情况下进行编码 因此我正在学习如何编写 makefile 这是我当前的测试项目 CoDstructor Makefile bin CoDstructor exe src cod main cpp type
  • Windows Azure 不生成 aspx 文件

    我设置了我的第一个 Azure Cloude 服务和 Web 角色 当我构建然后发布应用程序时 我只能看到包含所有 dll 的 bin 目录 我没有任何文件夹或 aspx 文件 ProjectName CloudService bin De
  • ASP.Net Core 2.0 中 [AllowHtml] 的替代品是什么[重复]

    这个问题在这里已经有答案了 我想将 CKEditor 集成到我的 MVC Core 2 0 应用程序中 在之前的版本中 我通过向字符串属性添加 AllowHTML 数据注释来使用它 但在 ASP Net Core 中我找不到将 HTML 插
  • 想要列表中不重复的元素

    从下面的列表中 我只需要 哇 和 退出 List
  • Rails 中的一对一或零关联

    Model I class TimeLog lt ActiveRecord Base has one custom time fields dependent gt destroy end Model II class CustomTime
  • 在代号一中使用 LocationManager 的正确方法

    我正在使用 LocationManager 来跟踪用户的位置并在 GoogleMaps 上显示相同的位置 我正在使用以下方法 但对此有一些疑问 为了第一次获取用户的位置 我使用 locationManager LocationManager
  • Microsoft VB.NET 命名约定

    VB NET 有标准命名约定吗 根据您的编程经验 想分享您对 VB NET 的命名约定吗 除了这种良好实践之外 还有任何指南吗 模式与实践 http www codeplex com Wiki View aspx ProjectName g
  • kubectl 端口转发和 NodePort 服务之间的区别

    kubectl port forwarding 将端口从本地主机转发到集群中的 pod 以获取对集群资源的访问权限 和 NodePort 服务类型之间有什么区别 您正在比较两个完全不同的事物 你应该compare https medium
  • 添加 google-play-services 后,您需要在此活动中使用 Theme.AppCompat 主题(或后代)

    在我目前正在开发的应用程序中 这是我的第一个 Android 应用程序 我使用 android maven plugin 和 maven android sdk deployer 应用程序一直运行良好 使用 ActionBarActivit
  • 类型类是必需的吗?

    我曾经问过一个问题哈斯克尔初学者 https groups google com forum topic haskell cafe C1zGMkYGTOY 是否使用 data newtype 还是类型类 在我的特殊情况下 事实证明不需要类型
  • Windows 上的 XNA 网络

    XNA 的内置网络功能有哪些 是否可以在Windows中使用XNA的内置网络 如果可以的话 有什么限制吗 如果您使用Microsoft Xna Framework Net 命名空间 http msdn microsoft com en us
  • Gem::Specification.reset 期间未解决的规范:

    启动 Guard 时 我得到以下输出 guard WARN Unresolved specs during Gem Specification reset lumberjack gt 1 0 2 ffi gt 0 5 0 WARN Clea
  • 重塑矩阵并将其转换为数据框,跟踪原始行和列索引

    我有一个大的 n m 矩阵 我想将其转换为 n m 3 数据框 我的矩阵类似于 1400 800 数据框的第一列应包含矩阵行索引 第二列应包含矩阵列索引 数据框的第三列应包含矩阵中每个单元格的值 我用 for 循环解决了这个问题 但我认为这
  • 访问 iText 中的 OpenType 字形变体

    在 iText 中使用 OpenType 字体构建 PDF 文档时 我想从字体内访问字形变体 特别是表格数字 由于 OpenType 字形变体没有 Unicode 索引 因此我不确定如何指定我想要使用一组特定的变体 表格数字 或通过其字形
  • iOS - 架构armv7的2个重复符号

    我在用Resty http projects lukeredpath co uk resty 在我的项目中的任何地方 但现在由于我必须将图像上传到服务器 所以我尝试添加另一个名为RestKit http restkit org 处理文件上传
  • Facebook JavaScript SDK 不适用于 Chrome 扩展

    我正在写一个 chrome 扩展 该扩展的功能包括 Facebook 登录 该扩展不支持外部 JavaScript 链接 因此我必须在扩展的清单文件中创建 content security policy 现在可以了 正在加载Facebook
  • 读取 strcpy() 返回值上的字符串字符时出错

    我尝试打印出strcpy 的返回值 https stackoverflow com questions 3561427 strcpy return value它给了我一个 访问冲突读取位置 异常 char ind 15 printf s n
  • 如何将单独的 int 值转换为十六进制字节数组

    我需要做一些 对我来说新的 int hex byte 工作 并且我正在努力使其正确 另一端的 tcp 服务器需要 Little Endian 我需要发送一个由十六进制值组成的字节数组 6000需要发送为 0x70 0x17 19需要发送为
  • Android Instant App - Play 控制台发布/部署错误且 DAL(数字资产链接)未链接

    我试图弄清楚为什么游戏商店不接受我的即时应用程序构建 我已经成功部署了Alpha定期向测试人员发布应用程序 因为这是发布即时应用程序的先决条件 我正在尝试部署一个发展发布即时应用程序 我究竟做错了什么 我尝试添加尽可能多的细节 我是否需要使