数字资产链接链接到我的网站 [英] Digital Assets Link link to my website

查看:100
本文介绍了数字资产链接链接到我的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个即时应用程序.我将其上传到我的Google控制台,但出现此错误.

I have created an instant app. I uploaded it to my Google Console, and I got this error.

www.kochchy.cz网站未链接到您的应用程序 通过数字资产链接协议.链接申请网站 使用Digital Assets Link.

The www.kochchy.cz website has not been linked to your application through the Digital Assets Link protocol. Link the application site with Digital Assets Link.

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
   "namespace": "android_app",
    "package_name": "com.kochchy.instantapptest.app",
    "sha256_cert_fingerprints":["A4:A6:74:15:F1:3E:38:3F:93:0F:EF:E3:A6:86:8E:7C:25:45:E8:80:5B:5E:35:70:49:20:DB:F8:CB:D4:FC:E0"]
  }
}] 

apk,即时和可安装二者均使用相同的ID: com.kochchy.instantapptest.app (每个均在自己的模块清单中定义)

Both apks, instant and installable use same id: com.kochchy.instantapptest.app (each defined in own module manifests)

我的 base 模块清单如下所示:

My base module manifest looks like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kochchy.instantapptest">

<uses-permission android:name="android.permission.INTERNET" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:theme="@style/AppTheme">

    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

        <meta-data
            android:name="default-url"
            android:value="https://www.kochchy.cz" />

        <intent-filter 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="https" />
            <data android:scheme="http" />
            <data android:host="www.kochchy.cz" />
            <data android:pathPattern="/menu" />
        </intent-filter>
    </activity>
</application>
</manifest>

------编辑------

我从Google Instant App示例中创建了新项目: https://github.com/googlesamples/android-instant-apps/tree/master/hello

I made new project from google instant app sample: https://github.com/googlesamples/android-instant-apps/tree/master/hello

相同的Google控制台错误.我想我的网络设置中有问题,而不是应用程序中有问题.

Same google console error. I guess there is problem in my web setup, not in the app.

www.kochchy.cz网站尚未链接到您的应用程序 通过数字资产链接协议.链接申请网站 使用数字资产链接.

The www.kochchy.cz website has not been linked to your application through the Digital Assets Link protocol. Link the application site with Digital Assets Link.

推荐答案

所以对我来说,也许对某些人来说这很明显是使用了错误的sha键. 您需要做的是转到您的 https://play.google.com/apps/publish/控制台

So for me, and maybe this is obvious to some, was the usage of the wrong sha key. What you need to do is go to your https://play.google.com/apps/publish/ console

转到发布管理,然后转到应用程序签名"页面.从那里复制SHA256密钥.

Go to Release Management then to the App Signing page. Copy the SHA256 key from there.

转到 https://developers.google.com/digital-asset-链接/工具/生成器,然后在其中输入sha键,URL和包名.

Go to https://developers.google.com/digital-asset-links/tools/generator and enter the sha key, url and packagename there.

将此文件上传到 https://example.com/.well-known/assetlinks. json

确保文件位于正确的位置:名为.well-known的文件夹.

Make sure that the file is in the correct location: A folder named .well-known.

发布您的即时应用

这篇关于数字资产链接链接到我的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆