Android 12深层链接不工作尝试了这么多方法,但没有得到解决方案,它打开浏览器中的链接,而不是在应用程序.我分享所有的东西,我尝试了请让我知道哪里出了问题.链接在更少的工作正常12设备
清单`
package=“com.erecord.erecordstudio”
<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:host="erecordstudio.com" />
<data android:scheme="https" />
</intent-filter>
”
我的数字资产json位于https://erecordstudio.com/.well-known/assetlinks.json `
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "xxx.xxxx.xxxxx",
"sha256_cert_fingerprints": [
"xxxxx",
]
}
}
]
Getting this sha when runnging keytool command in terminal
keytool -list -v -keystore /my_jks.jks
This is the asset json which is Google console app integrity
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "xxx.xxxx.xxxxx",
"sha256_cert_fingerprints":
["xxxxxx"]
}
}
]
when hitting this url to cross check it says wrong content type
[link_to_check_ditigal_asset_json]
https://%20https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://erecordstudio.com&relation=delegate_permission/common.handle_all_urls
it says
{
"maxAge": "599.999999883s",
"debugString": "********************* ERRORS *********************\n* Error: unavailable: Wrong content type in HTTP response headers while fetching statements from https://erecordstudio.com./.well-known/assetlinks.json (which is equivalent to 'https://erecordstudio.com/.well-known/assetlinks.json'): expected 'Content-Type: application/json' but found application/octet-stream [1] while fetching Web statements from https://erecordstudio.com./.well-known/assetlinks.json (which is equivalent to 'https://erecordstudio.com/.well-known/assetlinks.json') using download from the web (ID 1).\n********************* INFO MESSAGES *********************\n* Info: No statements were found that match your query\n",
"errorCode": [
"ERROR_CODE_WRONG_CONTENT_TYPE"
]
}
if this was the issue than how can i fix this content type application/json error
and also tried with this command
adb shell dumpsys package com.erecord.erecordstudio
it says
Domain verification status:
com.erecord.erecordstudio:
ID: 6d85377d-f25b-4c5d-a894-93970b2388c6
Signatures: [xxxxxx]
Domain verification state:
erecordstudio.com: legacy_failure
User all:
Verification link handling allowed: true
Selection state:
Disabled:
erecordstudio.com
> Now where i am doing mistake whats the wrong with this.
I am frustrated now please help to find out the solution
2条答案
按热度按时间ecr0jaav1#
我发现这个问题去浏览器检查,去网络,那里检查内容类型和它的问题在服务器没有权限的内容类型的json文件权限。
在server /opt/lampp/etc httpd.config中
如果你有访问权限,你可以在你的httpd.conf中使用下面的代码,甚至你的.htaccess,来强制Apache发送一个UTF-8编码的头。
添加类型'应用程序/json;' .json
sz81bmfz2#
对我来说,我修复了它添加了调试密钥的SHA-256在我的PC和发布上传密钥在sha256_cert_fingeries数组为字符串,使应用程序链接在调试工作(当运行应用程序从您的机器或生成apk和登录使用)和发布版本在Google Play等...