Short answer: package_name must equal the application ID from your build.gradle, exactly. A debug suffix, a flavour suffix or a typo means the statement is for a different app, and verification fails. Check the installed package with adb and update the file.
What is happening
package_name: the field in an assetlinks.json target that names the Android app by its application ID, which Google defines as the value from build.gradle.
Android matches the statement against the installed app. If the package does not match, the statement does not apply, even when the fingerprint and relation are correct.
- Build variants often have different application IDs, for example
com.example.app.debug. adb shell pm get-app-links com.example.appshows noverifieddomains, and Google's Statement List tester reports no match for your package name.
Why does this happen?
Most mismatches come from build configuration, not typos. A suffix added for one variant is easy to forget when writing the file.
- Variant suffixes: debug or flavour builds with their own ID, such as
com.example.app.debug. - Typos: a missing segment or a swapped word in a long ID.
- Renamed app: the file still carries an old application ID.
How to confirm it
- Check the application ID in
build.gradlefor the variant users install. - Confirm what is on the device:
adb shell pm get-app-links com.example.app. If the package is unknown, the ID is different. - Fetch the file:
curl -s https://example.com/.well-known/assetlinks.jsonand comparepackage_name. - Test the live file and your package name with Google's Statement List tester.
How to fix it
- Set
package_nameto the exact application ID of each build that should open links. - Add a separate statement for each variant with a different application ID.
- Pair each package with the fingerprint of the key that signs that variant.
- Deploy, then re-verify:
adb shell pm verify-app-links --re-verify com.example.app, wait a few minutes, thenadb shell pm get-app-links com.example.app. - Test a link:
adb shell am start -W -a android.intent.action.VIEW -d "https://example.com/product/1" com.example.app.
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.example.app",
"sha256_cert_fingerprints": ["14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"]
}
}
]
Add one statement per package, as shown in the Android App Links setup guide. If the package matches but verification still fails on Play installs, the cause is usually the signing key fingerprint.