ole*_*234 5 android applinks digital-assets-links android-instant-apps google-play-console
我想弄清楚为什么 Play 商店不接受我的即时应用程序构建。我已成功向测试人员部署了Alpha常规应用程序版本,因为它是发布免安装应用程序的先决条件。我正在尝试部署开发版即时应用程序。我究竟做错了什么?我试图添加尽可能多的细节。
我是否需要将以下链接中的 Digital Asset Link API 服务用于生产即时应用程序,还是用于其他用途? https://console.developers.google.com/apis/api/digitalassetlinks.googleapis.com/overview
将免安装应用程序版本上传到播放控制台时出现以下错误:
您的网站“example.com”尚未通过数字资产链接协议链接到您的应用。请通过数字资产链接协议将您的网站链接到您的应用程序。
我有点困惑的一件事是为什么当我单击链接并验证是否收到错误消息“添加资产报表失败。 ”如下图所示:
我注意到当我单击链接并验证按钮时,它会修改base 中的 strings.xml 文件并添加以下字符串:
<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、checklist和advisor的清单中有以下内容:<meta-data android:name="asset_statements" android:resource="@string/asset_statements"/>
项目描述和结构:
应用程序描述:这是一个概念验证应用程序。可安装的应用程序将打开带有两个按钮的主要功能活动,单击这些按钮将带您进入清单或顾问活动。有两个即时应用程序,instantapp-checklist 转到清单活动,而 Instantapp(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"]
}
}]
Run Code Online (Sandbox Code Playgroud)
在我的活动标签内的清单清单中,如下所示:
<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>
Run Code Online (Sandbox Code Playgroud)
我做过的自我检查:
在assetlinks.json文件中,字段package_name设置为blah.blah1.blah2.myappname.checklist。
然而,上面提到的是可安装应用程序的 id是blah.blah1.blah2.myappname。这意味着AndroidManifest.xml中的package_name设置为blah.blah1.blah2.myappname。
他们应该匹配。blah.blah1.blah2.myappname必须添加到服务器上的assetlinks.json中。
在strings.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>
Run Code Online (Sandbox Code Playgroud)
以下是帮助我找到解决方案的其他一些注释:
adb shell am start -a android.intent.action.VIEW -d "https://example.com/checklist/"
归档时间: |
|
查看次数: |
1266 次 |
最近记录: |