TWA浏览器URL不隐藏

洛伦佐·德·弗朗切斯科

我正在建立TWA,我遵循了所有在线教程,但无法隐藏chrome的上部网址栏:(资产链接文件在此处https://www.thept.it/.well-known/assetlinks.json

我使用此工具https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://www.thept.it&relation=delegate_permission/common.handle_all_urls验证了文件

应用程序位于此处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铬:[WARNING:digital_asset_links_handler.cc(115)]语句失败匹配包。

但是,根据资产链接工具,程序包名称是it.thept.it.thept

你能帮我吗?

洛伦佐·德·弗朗切斯科

在build.gradle中找到了解决方案REMOVE

// applicationIdSuffix = twaManifest.applicationId

buildTypes {
        release {
            minifyEnabled true
            //applicationIdSuffix = twaManifest.applicationId <------ this one
            versionNameSuffix = twaManifest.name
        }
    }

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何强制浏览器不规范unicode URL?

Robot Framework:打开Chrome浏览器而不启动URL

TWA URL栏未隐藏

当我不填写输入内容时,是否可以隐藏浏览器要求窗口?

在div跨浏览器中隐藏滚动条而不破坏溢出文本

如何在不破坏功能的情况下隐藏跨浏览器的滚动条

Chrome浏览器不尊重表格上的“视觉隐藏”类

从浏览器获取URL

隐藏浏览器弹出窗口-Watin

在浏览器中隐藏角度文件

如何从浏览器URL显示中隐藏目录的索引页

是否可以通过使用JavaScript在iOS 9(Safari浏览器)中隐藏URL栏?

如何从浏览器页面源代码中隐藏AJAX调用/ URL?

如何从浏览器的“网络”标签中隐藏Firebase Storage下载URL?

如何隐藏应用程序浏览器中的位置 url

如何在浏览器的URL中隐藏IP和端口?

Webview不覆盖默认浏览器

浏览器不兼容-渲染错误

浏览器不缓存 http 响应

jQuery的问题不刷新浏览器

tokbox iPhone不兼容的浏览器

使用锚导航而不更改浏览器 url 和 javascript

React Router更改路由/组件而不更改浏览器URL

如何在不更改浏览器历史记录的情况下更改url

NSData dataWithContentsOfURL:不返回浏览器中显示的URL的数据

从AngularJS调用时Angular Router不更新浏览器URL

您可以通过JavaScript导航到浏览器中的锚点而不更新URL吗?

如何使用鼠标(不按Enter键)将Chrome浏览器发送到URL?

htaccess-重定向到子文件夹而不更改浏览器URL