deep-linking - TWA 浏览器 URL 未隐藏
问题描述
我正在建立一个 TWA,我遵循了所有在线教程,但无法隐藏 chrome 的上部 url 栏:( 资产链接文件在这里 https://www.thept.it/.well-known/assetlinks.json
应用程序位于此处 https://www.thept.it/app
这是 twa 清单
def twaManifest = [
applicationId: 'it.thept',
hostName: 'www.thept.it', // The domain being opened in the TWA.
launchUrl: '/app', // The start path for the TWA. Must be relative to the domain.
name: 'ThePT', // The name shown on the Android Launcher.
themeColor: '#FF6628', // The color used for the status bar.
navigationColor: '#ffffff', // The color used for the navigation bar.
backgroundColor: '#FF6628', // The color used for the splash screen background.
enableNotifications: false, // Set to true to enable notification delegation.
// Add shortcuts for your app here. Every shortcut must include the following fields:
// - name: String that will show up in the shortcut.
// - short_name: Shorter string used if |name| is too long.
// - url: Absolute path of the URL to launch the app with (e.g '/create').
// - icon: Name of the resource in the drawable folder to use as an icon.
shortcuts: [
// Insert shortcuts here, for example:
],
// The duration of fade out animation in milliseconds to be played when removing splash screen.
splashScreenFadeOutDuration: 300
]
错误是
W chromium: [WARNING:digital_asset_links_handler.cc(115)] 语句失败匹配包。
但是根据 Asset Links Tool 的包名称是 it.thept.it.thept
你能帮帮我吗?
解决方案
在 build.gradle REMOVE 中找到了解决方案
//applicationIdSuffix = twaManifest.applicationId
buildTypes {
release {
minifyEnabled true
//applicationIdSuffix = twaManifest.applicationId <------ this one
versionNameSuffix = twaManifest.name
}
}
推荐阅读
- mysql - JMeter 不一致的 CommunicationsException:通信链路故障
- angular - translate.get 有时会返回键而不是翻译
- vue.js - 如何将带有翻译字符串的对象从 symfony 树枝传递到 vue 组件
- javascript - 使用 FTPS 包通过 FTP 发送文件。错误、日志和重试需要改进
- r - 创建一个循环,从前一个停止的地方开始
- reactjs - 仅导入 typescript 模块声明
- javascript - Vue 3,在设置中获取道具
- javascript - 如何过滤除 JavaScript 中的当前索引之外的对象数组?
- php - 正则表达式匹配联系人组
- javascript - RShiny:为什么 htmlOutput 会阻止 JavaScript 工作?