You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android 11设备Release构建游戏启动崩溃问题求助

问题:Android 11设备上签名Release包启动崩溃,Debug包正常

我的Android游戏在Android 8、Android 10设备上可正常启动,但在Android 11平板,以及搭载Android 11、MIUI 13.0.14的Poco X4 Pro 5G设备上,签名后的Release构建包启动时崩溃,Debug构建配置则无异常。尝试通过Intellij Idea直接连接Android 11设备启动Release配置,但无法查看日志。请问Android 11及以上系统下该问题的可能原因是什么?

我的Gradle配置如下:

plugins {
    id 'com.android.application'
}

var keystorePropertiesFile = rootProject.file("keystore.properties");
var keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {

    lintOptions {
        checkReleaseBuilds false
    }
    signingConfigs {
        release {
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
        }
    }
    compileSdk 33
    defaultConfig {
        applicationId "com.mgdsstudio.blueberet.mainpackage"
        minSdk 24
        targetSdk 33
        versionCode 1
        multiDexEnabled true
        versionName "2.8"
        project.archivesBaseName = "BlueBeret-" + defaultConfig.versionName;
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    signingConfigs{
        debug {

        }
        unsigned{
            storePassword = ""
            keyAlias = ""
            keyPassword = ""
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {

        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    buildFeatures {
        viewBinding true
    }
    namespace 'com.mgdsstudio.blueberet'
}

dependencies {
    // list of all libraries I use
}

repositories {
    mavenCentral()
}

昨日我在Android Studio中创建了一个全新项目,复制了相同的Activity和Gradle代码,使用Processing-core.jar库搭建了简单图形应用,仍出现相同问题。我打算将该项目发布到GitHub并附上链接。

内容的提问来源于stack exchange,提问作者Alexander Gorodilov

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.17 13:52:44