Digital Assets Link link to my website

后端 未结 7 1638
一向
一向 2020-12-03 19:10

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

The www.kochchy.cz website has not been linked to your appli

相关标签:
7条回答
  • 2020-12-03 19:22

    problem with sha256_cert_fingerprints. Application app singing was enabled so I copied sha from google play console and put that into asserlink.json file and it works .

    https://d5rwdr23d4fqx.cloudfront.net/.well-known/assetlinks.json

    0 讨论(0)
  • 2020-12-03 19:24
    "package_name": "com.kochchy.instantapptest.app"
    

    Here you should have your application Id from installable app not from instant app manifest

    defaultConfig {
        applicationId "com.example.yourappid"
    }
    
    0 讨论(0)
  • 2020-12-03 19:26

    check the assetlinks.json. has file permissions are executable to public

    by default it may only readable to public . and then make sure if enable google play app signing use the ssh key which provided in play console .

    0 讨论(0)
  • 2020-12-03 19:29

    In your json file, the field package_name is set to com.kochchy.instantapptest.app.

    However, the package name in your AndroidManifest.xml is set to com.kochchy.instantapptest.

    They should match.

    EDIT

    Your structure looks pretty different from the one recommended by Google.

    You shouldn't have to duplicate your code and resources. Instead, create a third module(let's call it base) to act as the base feature module, and move all your code and resources to there. Make sure its build.gradle includes these lines:

    apply plugin: 'com.android.feature'
    
    android {
        baseFeature true
        ...
    }
    
    dependencies {
        application project(':app')
        ...
    }
    

    In your app's build.gradle, make sure you have these lines in:

    apply plugin: 'com.android.application'
    ...
    dependencies {
        implementation project(':base')
    }
    

    Finally, in your instantapp's build.gradle:

    apply plugin: 'com.android.instantapp'
    ...
    dependencies {
        implementation project(':base')
    }
    

    You might need to make further changes, but this should be a good start. I strongly recommend you to take a look at this page, specially the section "Structure of a basic instant app".

    0 讨论(0)
  • 2020-12-03 19:29

    Try following these steps and verify that the generated file is the same as yours:

    Tools -> App Links Assistant -> (Click Button) Open Digital Asset Links File Generator

    After you complete everything, click Generate Digital Asset Links file.

    Click Save file to download it.

    Upload the assetlinks.json file to your site, with read-access for everyone, at https://www.exemple.com/.well-known/assetlinks.json.

    Click Link and Verify to confirm that you've uploaded the correct Digital Asset Links file to the correct location.

    Reference: https://developer.android.com/studio/write/app-link-indexing.html#associatesite

    0 讨论(0)
  • 2020-12-03 19:40

    In my case, it was the following: https://stackoverflow.com/a/44549183/8656558

    If you have done everything else correctly and are pulling your hair, consider ensuring that the file you added to your web server has the correct encoding (without BOM, in my case). Thank you, Visual Studio! :/

    0 讨论(0)
提交回复
热议问题