Сборка apk из pwa, не запускается apk файл

Всем привет. Есть сайт с pwa, всё ок. Из браузера иконка на стол устанавливается, всё работает. Пытаюсь собрать apk в android studio, приложение не запускается. Если оставлять в buildGradle.app в dependencies строку:

implementation 'com.github.GoogleChrome.custom-tabs-client:customtabs:e849e45c90'

то сборка не происходит, выпадает с кучей ошибок.. Если её удалить, то сборка ок, но финальный apk просто закрывается при запуске.

файл build.gradle:app

plugins {
    id 'com.android.application'
}

apply plugin: 'com.android.application'
android {
    compileSdk 32

    defaultConfig {
        applicationId "ru.gid.app"
        minSdk 19
        targetSdk 28
        versionCode 2
        versionName "1.0.1"

        manifestPlaceholders = [
                hostName: "app.gid.ru",
                defaultUrl: "/main.html",
                launcherName: "gid",
                assetStatements: '[{ "relation": ["delegate_permission/common.handle_all_urls"], ' +
                        '"target": {"namespace": "web", "site": "https://026c-78-37-196-76.ngrok.io"}}]'
        ]

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.github.GoogleChrome.custom-tabs-client:customtabs:e849e45c90'
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

файл: AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="ru.gid.app">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="${launcherName}"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.gid">

    <meta-data
        android:name="asset_statements"
        android:value="${assetStatements}" />

    <activity android:name="android.support.customtabs.trusted.LauncherActivity"
        android:label="${launcherName}">
        <meta-data android:name="android.support.customtabs.trusted.DEFAULT_URL"
            android:value="${defaultUrl}" />

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="https"
                android:host="${hostName}"/>
        </intent-filter>
    </activity>
</application>
    </manifest>

Ответы (0 шт):