Android Instant App - Play Console release/deploy error and DAL(digital Asset Link) not linked

孤街醉人 提交于 2019-12-05 16:40:20

In the assetlinks.json file, the field package_name is set to blah.blah1.blah2.myappname.checklist.

However, mentioned above is that the installable app's id is blah.blah1.blah2.myappname. That means the package_name in the AndroidManifest.xml is set to blah.blah1.blah2.myappname.

They should match. blah.blah1.blah2.myappname must be added to the assetlinks.json on the server.

In the strings.xml, change the 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>

Here are some other notes that helped me find the solution:

  • I used the following command line to test if the instant app works: adb shell am start -a android.intent.action.VIEW -d "https://example.com/checklist/"
  • On the device, I went to Settings > Google > Instant Apps and clicked the switch to uninstall/turn-off instant apps, then click it again to turn it back on . Also went to the Chrome settings(Settings > Privacy > Clear Browsing Data) to clear all data for time range, All Time.
  • When typing in the url to the instant app in Chrome, it only opens the website and not the instant app. If I click on a link to the instant app in a website it does open the instant app instead of the website.

It is weird, I had same problem. The solution was simple;

As @olearyj234 mentioned Link and Verify button adds string to end of string.xml.

I simply deleted the new string in string.xml and clicked the "Link and Verify" button.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!