首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TWA浏览器URL不隐藏

TWA浏览器URL不隐藏
EN

Stack Overflow用户
提问于 2020-03-14 16:23:56
回答 1查看 151关注 0票数 0

我正在构建一个TWA,我在线学习了所有教程,但无法隐藏chrome :(资产链接文件在这里https://www.thept.it/.well-known/assetlinks.json )的上url栏。

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

App位于这里,https://www.thept.it/app

这是环球航空公司的名单

代码语言:javascript
复制
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)语句失效匹配软件包.

但是根据Asset工具,包名是it.thept.it.thept

你能帮我吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-03-14 16:31:56

在build.gradle删除中找到解决方案

//applicationIdSuffix = twaManifest.applicationId

代码语言:javascript
复制
buildTypes {
        release {
            minifyEnabled true
            //applicationIdSuffix = twaManifest.applicationId <------ this one
            versionNameSuffix = twaManifest.name
        }
    }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60684851

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档