我试图弄清楚为什么游戏商店不接受我的即时应用程序构建。我已经成功部署了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:
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