You need to enable JavaScript to run this app. Android Studio开发带Custom Chrome Tab的应用安装后无法打开
优惠活动
大模型
产品
解决方案
定价
更多

Android Studio开发带Custom Chrome Tab的应用安装后无法打开

问题

我使用Android Studio开发了一款适配自有网站、集成Custom Chrome Tab的应用,构建调试版和签名发布版APK后,安装后均无法打开。此前参考过Stack Overflow上的相关问题,但对应的解决方案并不适用于我的情况。

相关代码

核心逻辑代码

public class AnnaStudio {
    String url = "https://www.example.com/";
    CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
    CustomTabsIntent customTabsIntent = builder.build();
    customTabsIntent.launchUrl(this, Uri.parse(url));

}

项目配置代码(build.gradle)

plugins {
    id 'com.android.application'
}

android {
    namespace 'com.example'
    compileSdk 33

    defaultConfig {
        applicationId "com.example"
        minSdk 24
        targetSdk 33
        versionCode 1
        versionName "1.0"

        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 "androidx.browser:browser:1.4.0"
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
错误截图

安装后无法打开应用

内容的提问来源于stack exchange,提问作者Alex Montsarj

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.29 18:03:27